This interface is extended by the SessionContext,
EntityContext, and MessageDrivenContext interfaces
to provide additional methods specific to the enterprise interface bean type.
SessionContext, MessageDrivenContext, EntityContext
| Modifier and Type | Method and Description |
|---|---|
| public Identity | Returns: TheIdentity object that identifies the caller.
Deprecated
Use Principal getCallerPrincipal() instead.
Obtain the java.security.Identity of the caller.
|
| public Principal | Returns: ThePrincipal object that identifies the caller. This
method never returns null.Obtain the |
| public Map | Returns: the context data that interceptor context associated with this invocation. If there is no context data, an emptyMap<String,Object>
object will be returned.The |
| public EJBHome | Returns: The enterprise bean's remote home interface.Obtain the enterprise bean's remote home interface. |
| public EJBLocalHome | Returns: The enterprise bean's local home interface.Obtain the enterprise bean's local home interface. |
| public Properties | Returns: The environment properties for the enterprise bean.
Deprecated
Use the JNDI naming context java:comp/env to access
enterprise bean's environment.
Obtain the enterprise bean's environment properties.
|
| public boolean | Returns: True if the current transaction is marked for rollback, false otherwise.Test if the transaction has been marked for rollback only. |
| public TimerService | |
| public UserTransaction | Returns: TheUserTransaction interface that the enterprise bean
instance can use for transaction demarcation.Obtain the transaction demarcation interface. |
| public boolean | Returns: True if the caller has the specified role.The role)java.security.Identity of the role to be tested.
Deprecated
Use boolean isCallerInRole(String roleName) instead.
Test if the caller has a given role.
|
| public boolean | Returns: True if the caller has the specified role.The name of the security role. The role must be one of
the security roles that is defined in the deployment descriptor. roleName)Test if the caller has a given security role. |
| public Object | |
| public void |
| getCallerIdentity | back to summary |
|---|---|
| public Identity getCallerIdentity()
Deprecated Use Principal getCallerPrincipal() instead. Obtain the
| |
| getCallerPrincipal | back to summary |
|---|---|
| public Principal getCallerPrincipal() throws IllegalStateException Obtain the
| |
| getContextData | back to summary |
|---|---|
| public Map The | |
| getEJBHome | back to summary |
|---|---|
| public EJBHome getEJBHome() throws IllegalStateException Obtain the enterprise bean's remote home interface.
| |
| getEJBLocalHome | back to summary |
|---|---|
| public EJBLocalHome getEJBLocalHome() throws IllegalStateException Obtain the enterprise bean's local home interface.
| |
| getEnvironment | back to summary |
|---|---|
| public Properties getEnvironment()
Deprecated Use the JNDI naming context java:comp/env to access enterprise bean's environment. Obtain the enterprise bean's environment properties. Note If the enterprise bean has no environment properties
this method returns an empty
| |
| getRollbackOnly | back to summary |
|---|---|
| public boolean getRollbackOnly() throws IllegalStateException Test if the transaction has been marked for rollback only. An enterprise bean instance can use this operation, for example, to test after an exception has been caught, whether it is fruitless to continue computation on behalf of the current transaction. Only enterprise beans with container-managed transactions are allowed to use this method.
| |
| getTimerService | back to summary |
|---|---|
| public TimerService getTimerService() throws IllegalStateException Get access to the EJB Timer Service.
| |
| getUserTransaction | back to summary |
|---|---|
| public UserTransaction getUserTransaction() throws IllegalStateException Obtain the transaction demarcation interface.
Only enterprise beans with bean-managed transactions are allowed to
to use the
| |
| isCallerInRole | back to summary |
|---|---|
| public boolean isCallerInRole(Identity role)
Deprecated Use boolean isCallerInRole(String roleName) instead. Test if the caller has a given role. This method is deprecated in EJB 1.1. The enterprise bean
should use the
| |
| isCallerInRole | back to summary |
|---|---|
| public boolean isCallerInRole(String roleName) throws IllegalStateException Test if the caller has a given security role.
| |
| lookup | back to summary |
|---|---|
| public Object lookup(String name) throws IllegalArgumentException Lookup a resource within the
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws IllegalStateException Mark the current transaction for rollback. The transaction will become permanently marked for rollback. A transaction marked for rollback can never commit. Only enterprise beans with container-managed transactions are allowed to use this method.
| |