org.jboss.ejb
Class MessageDrivenEnterpriseContext.MessageDrivenContextImpl

java.lang.Object
  extended byorg.jboss.ejb.EnterpriseContext.EJBContextImpl (src) 
      extended byorg.jboss.ejb.MessageDrivenEnterpriseContext.MessageDrivenContextImpl
All Implemented Interfaces:
EJBContext (src) , MessageDrivenContext (src)
Enclosing class:
MessageDrivenEnterpriseContext (src)

protected class MessageDrivenEnterpriseContext.MessageDrivenContextImpl
extends EnterpriseContext.EJBContextImpl (src)
implements MessageDrivenContext (src)

The EJBContext for MDBs.


Constructor Summary
protected MessageDrivenEnterpriseContext.MessageDrivenContextImpl()
           
 
Method Summary
 java.security.Principal getCallerPrincipal()
          Obtains the java.security.Principal of the caller.
 EJBHome (src) getEJBHome()
          Obtain the enterprise bean's remote home interface.
 EJBLocalHome (src) getEJBLocalHome()
          Obtain the enterprise bean's local home interface.
 boolean getRollbackOnly()
          If transaction type is not Container or there is no transaction then throw an exception.
 TimerService (src) getTimerService()
          Get access to the EJB Timer Service.
 UserTransaction (src) getUserTransaction()
          Obtain the transaction demarcation interface.
 boolean isCallerInRole(java.lang.String id)
          Tests if the caller has a given role.
 void setRollbackOnly()
          If transaction type is not Container or there is no transaction then throw an exception.
 
Methods inherited from class org.jboss.ejb.EnterpriseContext.EJBContextImpl (src)
getCallerIdentity, getEnvironment, isCallerInRole, lookup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.EJBContext (src)
getCallerIdentity, getEnvironment, isCallerInRole, lookup
 

Constructor Detail

MessageDrivenEnterpriseContext.MessageDrivenContextImpl

protected MessageDrivenEnterpriseContext.MessageDrivenContextImpl()
Method Detail

getEJBHome

public EJBHome (src)  getEJBHome()
Description copied from interface: EJBContext (src)
Obtain the enterprise bean's remote home interface.

Specified by:
getEJBHome in interface EJBContext (src)
Overrides:
getEJBHome in class EnterpriseContext.EJBContextImpl (src)

getEJBLocalHome

public EJBLocalHome (src)  getEJBLocalHome()
Description copied from interface: EJBContext (src)
Obtain the enterprise bean's local home interface.

Specified by:
getEJBLocalHome in interface EJBContext (src)
Overrides:
getEJBLocalHome in class EnterpriseContext.EJBContextImpl (src)

getTimerService

public TimerService (src)  getTimerService()
                             throws java.lang.IllegalStateException
Description copied from interface: EJBContext (src)
Get access to the EJB Timer Service.

Specified by:
getTimerService in interface EJBContext (src)
Overrides:
getTimerService in class EnterpriseContext.EJBContextImpl (src)
Throws:
java.lang.IllegalStateException

getCallerPrincipal

public java.security.Principal getCallerPrincipal()
Description copied from interface: EJBContext (src)
Obtains the java.security.Principal of the caller.

Specified by:
getCallerPrincipal in interface EJBContext (src)
Overrides:
getCallerPrincipal in class EnterpriseContext.EJBContextImpl (src)

isCallerInRole

public boolean isCallerInRole(java.lang.String id)
Description copied from interface: EJBContext (src)
Tests if the caller has a given role.

Specified by:
isCallerInRole in interface EJBContext (src)
Overrides:
isCallerInRole in class EnterpriseContext.EJBContextImpl (src)

getUserTransaction

public UserTransaction (src)  getUserTransaction()
Description copied from interface: EJBContext (src)
Obtain the transaction demarcation interface. Only enterprise beans with bean-managed transactions are allowed to to use the UserTransaction interface. As entity beans must always use container-managed transactions, only session beans with bean-managed transactions are allowed to invoke this method.

Specified by:
getUserTransaction in interface EJBContext (src)
Overrides:
getUserTransaction in class EnterpriseContext.EJBContextImpl (src)

getRollbackOnly

public boolean getRollbackOnly()
If transaction type is not Container or there is no transaction then throw an exception.

Specified by:
getRollbackOnly in interface EJBContext (src)
Overrides:
getRollbackOnly in class EnterpriseContext.EJBContextImpl (src)
Throws:
java.lang.IllegalStateException - If transaction type is not Container, or no transaction.

setRollbackOnly

public void setRollbackOnly()
If transaction type is not Container or there is no transaction then throw an exception.

Specified by:
setRollbackOnly in interface EJBContext (src)
Overrides:
setRollbackOnly in class EnterpriseContext.EJBContextImpl (src)
Throws:
java.lang.IllegalStateException - If transaction type is not Container, or no transaction.