站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

MessageDrivenEnterpriseContext.MessageDrivenContextImpl (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb
Class MessageDrivenEnterpriseContext.MessageDrivenContextImpl

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

protected class MessageDrivenEnterpriseContext.MessageDrivenContextImpl
extends EnterpriseContext.EJBContextImpl
implements javax.ejb.MessageDrivenContext

The EJBContext for MDBs.


Constructor Summary
protected MessageDrivenEnterpriseContext.MessageDrivenContextImpl()
           
 
Method Summary
 Principal getCallerPrincipal()
          Get the Principal for the current caller.
 javax.ejb.EJBHome getEJBHome()
           
 javax.ejb.EJBLocalHome getEJBLocalHome()
           
 boolean getRollbackOnly()
          If transaction type is not Container or there is no transaction then throw an exception.
 javax.ejb.TimerService getTimerService()
           
 UserTransaction getUserTransaction()
           
 boolean isCallerInRole(String id)
          Checks if the current 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
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
getCallerIdentity, getEnvironment, isCallerInRole, lookup
 

Constructor Detail

MessageDrivenEnterpriseContext.MessageDrivenContextImpl

protected MessageDrivenEnterpriseContext.MessageDrivenContextImpl()
Method Detail

getEJBHome

public javax.ejb.EJBHome getEJBHome()
Specified by:
getEJBHome in interface javax.ejb.EJBContext
Overrides:
getEJBHome in class EnterpriseContext.EJBContextImpl

getEJBLocalHome

public javax.ejb.EJBLocalHome getEJBLocalHome()
Specified by:
getEJBLocalHome in interface javax.ejb.EJBContext
Overrides:
getEJBLocalHome in class EnterpriseContext.EJBContextImpl

getTimerService

public javax.ejb.TimerService getTimerService()
                                       throws IllegalStateException
Specified by:
getTimerService in interface javax.ejb.EJBContext
Overrides:
getTimerService in class EnterpriseContext.EJBContextImpl
Throws:
IllegalStateException

getCallerPrincipal

public Principal getCallerPrincipal()
Description copied from class: EnterpriseContext.EJBContextImpl
Get the Principal for the current caller. This method cannot return null according to the ejb-spec.

Specified by:
getCallerPrincipal in interface javax.ejb.EJBContext
Overrides:
getCallerPrincipal in class EnterpriseContext.EJBContextImpl

isCallerInRole

public boolean isCallerInRole(String id)
Description copied from class: EnterpriseContext.EJBContextImpl
Checks if the current caller has a given role. The current caller is either the principal associated with the method invocation or the current run-as principal.

Specified by:
isCallerInRole in interface javax.ejb.EJBContext
Overrides:
isCallerInRole in class EnterpriseContext.EJBContextImpl

getUserTransaction

public UserTransaction getUserTransaction()
Specified by:
getUserTransaction in interface javax.ejb.EJBContext
Overrides:
getUserTransaction in class EnterpriseContext.EJBContextImpl

getRollbackOnly

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

Specified by:
getRollbackOnly in interface javax.ejb.EJBContext
Overrides:
getRollbackOnly in class EnterpriseContext.EJBContextImpl
Throws:
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 javax.ejb.EJBContext
Overrides:
setRollbackOnly in class EnterpriseContext.EJBContextImpl
Throws:
IllegalStateException - If transaction type is not Container, or no transaction.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.