|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bss.esb.EsbRouter
This MDB is the starting point in the ESB flow. It listens for the messages on the ESB input queue and routes them to the appropriate destination. The inbound message is expected to supply some "key" as a message property. This key is used to lookup a route from the routing table. The message is then sent to that route. In case of any failures, the message is sent to either the redelivery queue, deadletter queue or error queue depending upon the type of failure. The startup configuration for ESB is specified in an XML file whose URL has to be given in the environment entry named "EnvConfigUrl" in this MDB's deployment descriptor.
EsbConfigManager
,
TransportHandler
,
Serialized FormField Summary | |
protected javax.ejb.MessageDrivenContext |
ctx
|
Constructor Summary | |
EsbRouter()
|
Method Summary | |
void |
ejbCreate()
This method performs the intialization tasks for this MDB: |
void |
ejbRemove()
Unregisters the EsbRouterMonitorMBean instance. |
long |
getHighestTime()
Returns the timestamp of the latest message received by this MDB instance since the last call to resetTimings() . |
long |
getLowestTime()
Returns the timestamp of the first message received by this MDB instance since the last call to resetTimings() . |
int |
getMessageCount()
Returns the total number of messages received by this MDB instance since the last call to resetTimings() . |
java.lang.String |
getRoutingTableLocation()
Returns the URL string of the routing table xml file location. |
void |
onMessage(javax.jms.Message msg)
Processes the messages received by the ESB on its configured input queue. |
void |
resetTimings()
Resets the values of count , timeHigh
and timeLow members. |
void |
setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
|
void |
setRoutingTableLocation(java.lang.String urlString)
Sets the location URL from where the routing table xml file will be loaded. |
void |
updateRoutingTable()
Updates the EsbConfigurationDocument instance of this MDB by reloading the EsbRoutingTable.xml file from the configured location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.ejb.MessageDrivenContext ctx
Constructor Detail |
public EsbRouter()
Method Detail |
public void setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
setMessageDrivenContext
in interface javax.ejb.MessageDrivenBean
public void ejbCreate() throws javax.ejb.CreateException
1) The config.xml is read and parsed into an XmlBean in this method. 2) From this XmlBean, the rest of the confiuration parameters are read. 3) The EsbConfiguration XML is read and used to initialize the EsbConfigManager instance. 4) The EsbRouterMonitorMBean is created and registered.
javax.ejb.CreateException
public void ejbRemove()
ejbRemove
in interface javax.ejb.MessageDrivenBean
public void onMessage(javax.jms.Message msg)
onMessage
in interface javax.jms.MessageListener
msg
- The input message received on the ESB's input queue.public int getMessageCount()
resetTimings()
.
public long getLowestTime()
resetTimings()
.
public long getHighestTime()
resetTimings()
.
public void resetTimings()
count
, timeHigh
and timeLow
members.
public void updateRoutingTable() throws javax.management.MBeanException
EsbConfigManager
instance of this MDB to
refltect the configuration changes found in the reloaded routing
table file.
javax.management.MBeanException
public java.lang.String getRoutingTableLocation()
public void setRoutingTableLocation(java.lang.String urlString)
urlString
- URL string for the routing table xml file location.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |