|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas_ejb.container.JContext
public abstract class JContext
This class implements javax.ejb.EJBContext class. It may be extended in JSessionContext or JEntityContext
Field Summary | |
---|---|
protected JFactory |
bf
|
protected javax.ejb.EnterpriseBean |
myinstance
|
protected org.objectweb.transaction.jta.TransactionManager |
tm
|
Constructor Summary | |
---|---|
protected |
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. |
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. |
int |
getState()
Get the Instance State |
abstract javax.ejb.TimerService |
getTimerService()
Get access to the EJB Timer Service. |
javax.transaction.UserTransaction |
getUserTransaction()
Obtains the transaction demarcation interface. |
javax.resource.spi.work.WorkManager |
getWorkManager()
Get the WorkManager |
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 roleName)
Test if the caller has a given role. |
void |
setRollbackOnly()
Marks the current transaction for rollback. |
void |
setState(int newState)
Set the instance State |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.ejb.EnterpriseBean myinstance
protected final JFactory bf
protected final org.objectweb.transaction.jta.TransactionManager tm
Constructor Detail |
---|
protected JContext(JFactory bf, javax.ejb.EnterpriseBean i)
bf
- - the BeanFactoryi
- - the bean instanceMethod Detail |
---|
public void setState(int newState)
public int getState()
java.lang.Exception
public javax.resource.spi.work.WorkManager getWorkManager()
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
java.lang.IllegalStateException
- no security context existspublic 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() throws java.lang.IllegalStateException
getRollbackOnly
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
- if state is 0public abstract javax.ejb.TimerService getTimerService() throws java.lang.IllegalStateException
getTimerService
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
- Thrown if the instance is not
allowed to use this method (e.g. if the bean is a stateful session bean)public javax.transaction.UserTransaction getUserTransaction() throws java.lang.IllegalStateException
getUserTransaction
in interface javax.ejb.EJBContext
java.lang.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 roleName) throws java.lang.IllegalStateException
isCallerInRole
in interface javax.ejb.EJBContext
roleName
- The name of the security role.
The role must be one of the security-role-ref that is defined in the
deployment descriptor.
java.lang.IllegalStateException
- Security service not startedpublic void setRollbackOnly() throws java.lang.IllegalStateException
setRollbackOnly
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
- in getRollbackOnly() method
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |