org.jboss.soa.esb.listeners
Class JmsQueueListener

java.lang.Object
  extended by org.jboss.soa.esb.listeners.JmsQueueListener
All Implemented Interfaces:
java.lang.Runnable, java.util.Observer

public class JmsQueueListener
extends java.lang.Object
implements java.lang.Runnable, java.util.Observer


Field Summary
static java.lang.String LISTEN_JNDI_TYPE
           
static java.lang.String LISTEN_JNDI_URL
           
static java.lang.String LISTEN_MSG_SELECTOR
           
static java.lang.String LISTEN_QUEUE
           
static java.lang.String LISTEN_QUEUE_CONN_FACT
           
protected  boolean m_bError
           
protected  int m_iMaxThr
           
protected  int m_iQthr
           
protected  int m_iSleepForThreads
           
protected  int m_iUpperThreadLimit
           
protected  GpListener m_oDad
           
protected  java.lang.Class m_oExecClass
           
protected  org.apache.log4j.Logger m_oLogger
           
protected  DomElement m_oParms
           
protected  javax.jms.QueueConnection m_oQconn
           
protected  javax.jms.QueueSession m_oQsess
           
protected  javax.jms.Queue m_oQueue
           
protected  javax.jms.MessageConsumer m_oRdr
           
protected  java.lang.ThreadGroup m_oThrGrp
           
protected  java.lang.String m_sSelector
           
 
Constructor Summary
JmsQueueListener(GpListener p_oDad, DomElement p_oParms)
           
 
Method Summary
protected  void checkMyParms()
          Check for mandatory and optional attributes in parameter tree
 void run()
          Implement run method for this Runnable

Will continue to run until controlling class (ref in m_oDad) indicates no more looping allowed for all child classes

This condition will not prevent child processes to finish normally

 void update(java.util.Observable p_oObs, java.lang.Object p_oUsrObj)
          Implementation of Observer interface

Just count the number of active child threads

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_iSleepForThreads

protected int m_iSleepForThreads

m_iUpperThreadLimit

protected int m_iUpperThreadLimit

LISTEN_QUEUE_CONN_FACT

public static final java.lang.String LISTEN_QUEUE_CONN_FACT
See Also:
Constant Field Values

LISTEN_JNDI_TYPE

public static final java.lang.String LISTEN_JNDI_TYPE
See Also:
Constant Field Values

LISTEN_JNDI_URL

public static final java.lang.String LISTEN_JNDI_URL
See Also:
Constant Field Values

LISTEN_QUEUE

public static final java.lang.String LISTEN_QUEUE
See Also:
Constant Field Values

LISTEN_MSG_SELECTOR

public static final java.lang.String LISTEN_MSG_SELECTOR
See Also:
Constant Field Values

m_bError

protected boolean m_bError

m_oQconn

protected javax.jms.QueueConnection m_oQconn

m_oQsess

protected javax.jms.QueueSession m_oQsess

m_oQueue

protected javax.jms.Queue m_oQueue

m_sSelector

protected java.lang.String m_sSelector

m_oRdr

protected javax.jms.MessageConsumer m_oRdr

m_iQthr

protected int m_iQthr

m_iMaxThr

protected int m_iMaxThr

m_oThrGrp

protected java.lang.ThreadGroup m_oThrGrp

m_oLogger

protected org.apache.log4j.Logger m_oLogger

m_oDad

protected GpListener m_oDad

m_oParms

protected DomElement m_oParms

m_oExecClass

protected java.lang.Class m_oExecClass
Constructor Detail

JmsQueueListener

public JmsQueueListener(GpListener p_oDad,
                        DomElement p_oParms)
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

checkMyParms

protected void checkMyParms()
                     throws java.lang.Exception
Check for mandatory and optional attributes in parameter tree

Throws:
java.lang.Exception - - if mandatory atts are not right or actionClass not in classpath

run

public void run()
Implement run method for this Runnable

Will continue to run until controlling class (ref in m_oDad) indicates no more looping allowed for all child classes

This condition will not prevent child processes to finish normally

Specified by:
run in interface java.lang.Runnable

update

public void update(java.util.Observable p_oObs,
                   java.lang.Object p_oUsrObj)
Implementation of Observer interface

Just count the number of active child threads

Specified by:
update in interface java.util.Observer