|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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.EJBContextEJBContext.getEJBHome()public javax.ejb.EJBLocalHome getEJBLocalHome()
getEJBLocalHome in interface javax.ejb.EJBContextEJBContext.getEJBLocalHome()public java.util.Properties getEnvironment()
getEnvironment in interface javax.ejb.EJBContextEJBContext.getEnvironment()public java.security.Identity getCallerIdentity()
getCallerIdentity in interface javax.ejb.EJBContextEJBContext.getCallerIdentity()public java.security.Principal getCallerPrincipal()
getCallerPrincipal in interface javax.ejb.EJBContextEJBContext.getCallerPrincipal()public boolean isCallerInRole(java.security.Identity arg0)
isCallerInRole in interface javax.ejb.EJBContextEJBContext.isCallerInRole(java.security.Identity)public boolean isCallerInRole(java.lang.String role)
isCallerInRole in interface javax.ejb.EJBContextEJBContext.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.EJBContextjavax.transaction.UserTransaction object
java.lang.IllegalStateExceptionEJBContext.getUserTransaction()
public void setRollbackOnly()
throws java.lang.IllegalStateException
setRollbackOnly in interface javax.ejb.EJBContextjava.lang.IllegalStateExceptionEJBContext.setRollbackOnly()
public boolean getRollbackOnly()
throws java.lang.IllegalStateException
getRollbackOnly in interface javax.ejb.EJBContextjava.lang.IllegalStateExceptionEJBContext.getRollbackOnly()
public javax.ejb.EJBLocalObject getEJBLocalObject()
throws java.lang.IllegalStateException
getEJBLocalObject in interface javax.ejb.SessionContextjava.lang.IllegalStateException
public javax.ejb.EJBObject getEJBObject()
throws java.lang.IllegalStateException
getEJBObject in interface javax.ejb.SessionContextjava.lang.IllegalStateException
public java.lang.Object getPrimaryKey()
throws java.lang.IllegalStateException
getPrimaryKey in interface javax.ejb.EntityContextjava.lang.IllegalStateExceptionEntityContext.getPrimaryKey()public void setPrimaryKey(java.lang.Object primaryKey)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||