|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.objectweb.jonas_ejb.container.JMessageDrivenBean
Generic interposed class for Message Driven Beans This class presents these interfaces, depending on object reached: ServerSession interface to the ServerSessionPool MessageDrivenContext interface to the bean instance MessageListener interface to the JMS Session Runnable interface to the ThreadPool
| Field Summary | |
protected JMdbFactory |
bf
|
protected javax.ejb.MessageDrivenBean |
mdb
|
protected javax.jms.Session |
sess
|
protected ThreadPool |
thpool
|
protected javax.transaction.TransactionManager |
tm
|
protected int |
txattr
|
| Constructor Summary | |
JMessageDrivenBean(JMdbFactory bf,
javax.jms.Session sess,
javax.ejb.MessageDrivenBean mdb,
ThreadPool thpool)
constructor |
|
| Method Summary | |
java.security.Identity |
getCallerIdentity()
Deprecated. |
java.security.Principal |
getCallerPrincipal()
Obtain the java.security.Principal that identifies the caller. throws a java.lang.IllegalStateException for message driven bean because there is no security context available (EJB v2.0, chapter 14.5.1) |
javax.ejb.EJBHome |
getEJBHome()
Is disallowed. |
javax.ejb.EJBLocalHome |
getEJBLocalHome()
Is disallowed. |
java.util.Properties |
getEnvironment()
Deprecated. Use the JNDI naming context java:comp/env instead. |
boolean |
getRollbackOnly()
Tests if the transaction has been marked for rollback only. |
javax.jms.Session |
getSession()
Return the ServerSession's Session. |
javax.transaction.UserTransaction |
getUserTransaction()
Obtains the transaction demarcation interface. |
boolean |
isCallerInRole(java.security.Identity role)
Deprecated. |
boolean |
isCallerInRole(java.lang.String roleLink)
Test if the caller has a given role. |
void |
onMessage(javax.jms.Message message)
A message has been received by the Session. |
void |
run()
Process messages by calling run method on Session. |
void |
setRollbackOnly()
Marks the current transaction for rollback. |
void |
start()
Cause the session's run method to be called to process messages that were just assigned to it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.jms.Session sess
protected JMdbFactory bf
protected javax.ejb.MessageDrivenBean mdb
protected int txattr
protected javax.transaction.TransactionManager tm
protected ThreadPool thpool
| Constructor Detail |
public JMessageDrivenBean(JMdbFactory bf,
javax.jms.Session sess,
javax.ejb.MessageDrivenBean mdb,
ThreadPool thpool)
bf - The MDB Factorysess - The JMS Sessionmdb - The Message Driven Beanthpool - The Thread Pool| Method Detail |
public void onMessage(javax.jms.Message message)
onMessage in interface javax.jms.MessageListenermessage - The received message to handle.
public javax.jms.Session getSession()
throws javax.jms.JMSException
getSession in interface javax.jms.ServerSessionjavax.jms.JMSException - - if a JMS fails to get associated session
for this serverSession due to some internal error.
public void start()
throws javax.jms.JMSException
start in interface javax.jms.ServerSessionjavax.jms.JMSException - - if a JMS fails to start the server session
to process messages.public void run()
run in interface java.lang.Runnablepublic java.security.Identity getCallerIdentity()
getCallerIdentity in interface javax.ejb.EJBContextjava.lang.IllegalStateException - alwayspublic java.security.Principal getCallerPrincipal()
getCallerPrincipal in interface javax.ejb.EJBContextjava.lang.IllegalStateException - alwayspublic boolean isCallerInRole(java.security.Identity role)
isCallerInRole in interface javax.ejb.EJBContextjava.lang.IllegalStateException - for message driven bean because there is no security context availablepublic boolean isCallerInRole(java.lang.String roleLink)
isCallerInRole in interface javax.ejb.EJBContextjava.lang.IllegalStateException - for message driven bean because there is no security context availablepublic void setRollbackOnly()
setRollbackOnly in interface javax.ejb.EJBContextjava.lang.IllegalStateException - if the instance is not associated with a transactionpublic boolean getRollbackOnly()
getRollbackOnly in interface javax.ejb.EJBContextpublic javax.ejb.EJBHome getEJBHome()
getEJBHome in interface javax.ejb.EJBContextjava.lang.IllegalStateException - Always.public javax.ejb.EJBLocalHome getEJBLocalHome()
getEJBLocalHome in interface javax.ejb.EJBContextjava.lang.IllegalStateException - Always.public java.util.Properties getEnvironment()
getEnvironment in interface javax.ejb.EJBContext
public javax.transaction.UserTransaction getUserTransaction()
throws java.lang.IllegalStateException
getUserTransaction in interface javax.ejb.EJBContextIllegalStateException: - Thrown if the instance container does
not make the UserTransaction interface available to the instance.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||