|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mockejb.MockEjbContext
Provides implementation of javax.ejb.SessionContext
,
javax.ejb.MessageDrivenContext
and javax.ejb.EntityContext
as well as some extra convenience methods.
Method Summary | |
java.security.Identity |
getCallerIdentity()
This method is not supported |
java.security.Principal |
getCallerPrincipal()
Returns the principal that was logged in using MockContainer.login. |
javax.ejb.EJBHome |
getEJBHome()
|
javax.ejb.EJBLocalHome |
getEJBLocalHome()
|
javax.ejb.EJBLocalObject |
getEJBLocalObject()
Obtains a reference to the EJB local object that is currently associated with the instance. |
javax.ejb.EJBObject |
getEJBObject()
Obtains a reference to the EJB object that is currently associated with the instance. |
java.util.Properties |
getEnvironment()
Always returns empty Properties object. |
java.lang.Object |
getPrimaryKey()
Returns the primary key for entity beans. |
boolean |
getRollbackOnly()
|
javax.transaction.UserTransaction |
getUserTransaction()
Calls TransactionManager to get the
javax.transaction.UserTransaction object. |
boolean |
isCallerInRole(java.security.Identity arg0)
This method is not supported |
boolean |
isCallerInRole(java.lang.String role)
|
boolean |
isRemote()
Tests if the business interface for this context's bean is remote interface meaning that it extends EJBObject . |
void |
setPrimaryKey(java.lang.Object primaryKey)
|
void |
setRollbackOnly()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public boolean isRemote()
EJBObject
.
public javax.ejb.EJBHome getEJBHome()
getEJBHome
in interface javax.ejb.EJBContext
EJBContext.getEJBHome()
public javax.ejb.EJBLocalHome getEJBLocalHome()
getEJBLocalHome
in interface javax.ejb.EJBContext
EJBContext.getEJBLocalHome()
public java.util.Properties getEnvironment()
getEnvironment
in interface javax.ejb.EJBContext
EJBContext.getEnvironment()
public java.security.Identity getCallerIdentity()
getCallerIdentity
in interface javax.ejb.EJBContext
EJBContext.getCallerIdentity()
public java.security.Principal getCallerPrincipal()
getCallerPrincipal
in interface javax.ejb.EJBContext
EJBContext.getCallerPrincipal()
public boolean isCallerInRole(java.security.Identity arg0)
isCallerInRole
in interface javax.ejb.EJBContext
EJBContext.isCallerInRole(java.security.Identity)
public boolean isCallerInRole(java.lang.String role)
isCallerInRole
in interface javax.ejb.EJBContext
EJBContext.isCallerInRole(java.lang.String)
public javax.transaction.UserTransaction getUserTransaction() throws java.lang.IllegalStateException
TransactionManager
to get the
javax.transaction.UserTransaction
object.
getUserTransaction
in interface javax.ejb.EJBContext
javax.transaction.UserTransaction
object
java.lang.IllegalStateException
EJBContext.getUserTransaction()
public void setRollbackOnly() throws java.lang.IllegalStateException
setRollbackOnly
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
EJBContext.setRollbackOnly()
public boolean getRollbackOnly() throws java.lang.IllegalStateException
getRollbackOnly
in interface javax.ejb.EJBContext
java.lang.IllegalStateException
EJBContext.getRollbackOnly()
public javax.ejb.EJBLocalObject getEJBLocalObject() throws java.lang.IllegalStateException
getEJBLocalObject
in interface javax.ejb.SessionContext
java.lang.IllegalStateException
public javax.ejb.EJBObject getEJBObject() throws java.lang.IllegalStateException
getEJBObject
in interface javax.ejb.SessionContext
java.lang.IllegalStateException
public java.lang.Object getPrimaryKey() throws java.lang.IllegalStateException
getPrimaryKey
in interface javax.ejb.EntityContext
java.lang.IllegalStateException
EntityContext.getPrimaryKey()
public void setPrimaryKey(java.lang.Object primaryKey)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |