org.objectweb.jonas.jtests.beans.message
Class Listener
org.objectweb.jonas.jtests.beans.message.Listener
- Direct Known Subclasses:
- Q1txreqMD, Q2txnotMD, Q3commitMD, Q3rollbackMD, T1txnotMD, T1txreqMD, T2txnotMD, T2txreqMD
- public class Listener
Common code for all Message Driven Beans
- Author:
- Philippe Durieux, Philippe Coq
Field Summary |
protected MRecordHome |
arh
|
protected static org.objectweb.util.monolog.api.Logger |
logger
|
protected javax.ejb.MessageDrivenContext |
mdbContext
|
protected java.lang.String |
myname
|
Constructor Summary |
Listener()
Default constructor |
Method Summary |
void |
ejbCreate()
The Message driven bean must define an ejbCreate methods with no args. |
void |
ejbRemove()
A container invokes this method before it ends the life of the message-driven object.
|
void |
onMessage(javax.jms.Message message)
onMessage method |
void |
setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
Set the associated context. |
logger
protected static org.objectweb.util.monolog.api.Logger logger
mdbContext
protected transient javax.ejb.MessageDrivenContext mdbContext
arh
protected transient MRecordHome arh
myname
protected java.lang.String myname
Listener
public Listener()
- Default constructor
setMessageDrivenContext
public void setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
- Set the associated context. The container call this method
after the instance creation.
The enterprise Bean instance should store the reference to the context
object in an instance variable.
This method is called with no transaction context.
- Parameters:
MessageDrivenContext
- A MessageDrivenContext interface for the instance.- Throws:
EJBException
- Thrown by the method to indicate a failure caused by
a system-level error.
ejbRemove
public void ejbRemove()
- A container invokes this method before it ends the life of the message-driven object.
This happens when a container decides to terminate the message-driven object.
This method is called with no transaction context.
- Throws:
EJBException
- Thrown by the method to indicate a failure caused by
a system-level error.
ejbCreate
public void ejbCreate()
- The Message driven bean must define an ejbCreate methods with no args.
onMessage
public void onMessage(javax.jms.Message message)
- onMessage method