|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas_ejb.container.JContext
This class implements javax.ejb.EJBContext class. It may be extended in JSessionContext or JEntityContext
Field Summary | |
protected JFactory |
bf
|
protected JContainer |
cont
|
protected JHome |
home
|
protected javax.ejb.EnterpriseBean |
instance
|
protected JLocalHome |
localhome
|
protected java.security.Guard |
roleGuard
|
protected javax.transaction.TransactionManager |
tm
|
Constructor Summary | |
JContext(JFactory bf,
javax.ejb.EnterpriseBean i)
Constructs a JContext |
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 if there is no security context available |
javax.ejb.EJBHome |
getEJBHome()
the enterprise bean's home interface. |
javax.ejb.EJBLocalHome |
getEJBLocalHome()
Obtain the enterprise bean's local home interface. |
java.util.Properties |
getEnvironment()
Deprecated. |
boolean |
getRollbackOnly()
Tests if the transaction has been marked for rollback only. |
javax.transaction.UserTransaction |
getUserTransaction()
Obtains the transaction demarcation interface. |
boolean |
isCallerInRole(java.security.Identity role)
Deprecated. Use boolean isCallerInRole(String roleName) instead. Tests if the caller has a given role. |
boolean |
isCallerInRole(java.lang.String roleLink)
Test if the caller has a given role. |
void |
setRollbackOnly()
Marks the current transaction for rollback. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.ejb.EnterpriseBean instance
protected JFactory bf
protected JHome home
protected JLocalHome localhome
protected JContainer cont
protected java.security.Guard roleGuard
protected javax.transaction.TransactionManager tm
Constructor Detail |
public JContext(JFactory bf, javax.ejb.EnterpriseBean i)
bf
- - the BeanFactoryi
- - the bean instanceMethod Detail |
public java.security.Identity getCallerIdentity()
getCallerIdentity
in interface javax.ejb.EJBContext
public java.security.Principal getCallerPrincipal() throws java.lang.IllegalStateException
getCallerPrincipal
in interface javax.ejb.EJBContext
public javax.ejb.EJBHome getEJBHome() throws java.lang.IllegalStateException
getEJBHome
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
- - if the enterprise bean does not have a local home interface.public javax.ejb.EJBLocalHome getEJBLocalHome() throws java.lang.IllegalStateException
getEJBLocalHome
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
- if the enterprise bean does not have a local home interface.public java.util.Properties getEnvironment()
getEnvironment
in interface javax.ejb.EJBContext
public boolean getRollbackOnly()
getRollbackOnly
in interface javax.ejb.EJBContext
public javax.transaction.UserTransaction getUserTransaction() throws java.lang.IllegalStateException
getUserTransaction
in interface javax.ejb.EJBContext
IllegalStateException:
- Thrown if the instance container does
not make the UserTransaction interface available to the
instance. (not bean managed)public boolean isCallerInRole(java.security.Identity role)
isCallerInRole
in interface javax.ejb.EJBContext
role
- - The java.security.Identity of the role to be tested.public boolean isCallerInRole(java.lang.String roleLink) throws java.lang.IllegalStateException
isCallerInRole
in interface javax.ejb.EJBContext
roleLink
- The name of the security role.
The role must be one of the security-role-ref that is defined in the
deployment descriptor.public void setRollbackOnly()
setRollbackOnly
in interface javax.ejb.EJBContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |