org.bss.esb.redelivery
Class RedeliveryRequestProcessor
java.lang.Object
org.bss.esb.redelivery.RedeliveryRequestProcessor
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, javax.ejb.MessageDrivenBean, javax.jms.MessageListener, java.io.Serializable
- public class RedeliveryRequestProcessor
- extends java.lang.Object
- implements javax.ejb.MessageDrivenBean, javax.jms.MessageListener
This MDB processes the redelivery requests that are sent by the ESB router
over the configured topic. The redelivery request is a JMS ObjectMessage
that contains a java.lang.Long as payload. This java.lang.Long object
corresponds to:
1. The time when a message from the configured redelivery queue will be
received.
2. The match value of a long property of the message to be redelivered.
The name of this property is configurable.
- Version:
- 1.0
- Author:
- Balwinder Sodhi
- See Also:
RedeliveryScheduler
,
RedeliveryTask
,
Timer
,
Serialized Form
Field Summary |
protected javax.ejb.MessageDrivenContext |
ctx
|
Method Summary |
void |
ejbCreate()
We intialilize the JNDI initial naming context instance and
the RedeliveryScheduler instance in this method. |
void |
ejbRemove()
The RedeliveryScheduler is stopped on removal of this MDB instance
and the MBean associated with that scheduler is also unregistered. |
void |
onMessage(javax.jms.Message msg)
Process the redelivery request message that is receoived. |
void |
setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ctx
protected javax.ejb.MessageDrivenContext ctx
RedeliveryRequestProcessor
public RedeliveryRequestProcessor()
ejbCreate
public void ejbCreate()
throws javax.ejb.CreateException
- We intialilize the JNDI initial naming context instance and
the
RedeliveryScheduler
instance in this method.
- Throws:
javax.ejb.CreateException
ejbRemove
public void ejbRemove()
throws javax.ejb.EJBException
- The RedeliveryScheduler is stopped on removal of this MDB instance
and the MBean associated with that scheduler is also unregistered.
- Specified by:
ejbRemove
in interface javax.ejb.MessageDrivenBean
- Throws:
javax.ejb.EJBException
setMessageDrivenContext
public void setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
- Specified by:
setMessageDrivenContext
in interface javax.ejb.MessageDrivenBean
onMessage
public void onMessage(javax.jms.Message msg)
- Process the redelivery request message that is receoived. It simply
calls the
scheduleMessageForDelivery
method of the
RedeliveryScheduler instance that we have.
- Specified by:
onMessage
in interface javax.jms.MessageListener
- Parameters:
msg
- The ObjectMessage instance containing a java.lang.Long
Copyright © 2005 Balwinder Sodhi. All Rights Reserved.