|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.container.EasyBeansEJBContext<BeanType>
BeanType
- The type of bean managed.public class EasyBeansEJBContext<BeanType extends EasyBeansBean>
Class implementing the EJBContext interface. It is extended for Session context or MessageDriven Context
Nested Class Summary | |
---|---|
(package private) class |
EasyBeansEJBContext.MissingTimerService
Implementation of Timer Service that throws exception as it means that the timer component is missing. |
Field Summary | |
---|---|
private Factory |
easyBeansFactory
Link to the factory. |
private static java.lang.String |
JAVA_COMP_ENV
java:comp/env prefix. |
private JLog |
logger
Logger. |
private boolean |
runAsBean
Bean is using run-as ? |
private TimerService |
timerService
Timer service. |
private TransactionManagementType |
transactionManagementType
Type of transaction. |
private javax.transaction.TransactionManager |
transactionManager
Reference to the transaction manager. |
Constructor Summary | |
---|---|
EasyBeansEJBContext(Factory easyBeansFactory)
Builds a default EJB Context implementation. |
Method Summary | |
---|---|
BeanType |
getBean()
Gets the bean of this context. |
java.security.Identity |
getCallerIdentity()
Deprecated. |
java.security.Principal |
getCallerPrincipal()
Obtain the java.security.Principal that identifies the caller. |
EJBHome |
getEJBHome()
Obtain the enterprise bean's remote home interface. |
EJBLocalHome |
getEJBLocalHome()
Obtain the enterprise bean's local home interface. |
java.util.Properties |
getEnvironment()
Deprecated. |
boolean |
getRollbackOnly()
Test if the transaction has been marked for rollback only. |
TimerService |
getTimerService()
Get access to the EJB Timer Service. |
javax.transaction.UserTransaction |
getUserTransaction()
Obtain the transaction demarcation interface. |
boolean |
isCallerInRole(java.security.Identity role)
Deprecated. |
boolean |
isCallerInRole(java.lang.String roleName)
Test if the caller has a given security role. |
java.lang.Object |
lookup(java.lang.String name)
Lookup object with given name. |
void |
setRollbackOnly()
Mark the current transaction for rollback. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private JLog logger
private static final java.lang.String JAVA_COMP_ENV
private javax.transaction.TransactionManager transactionManager
private TransactionManagementType transactionManagementType
private boolean runAsBean
private Factory easyBeansFactory
private TimerService timerService
Constructor Detail |
---|
public EasyBeansEJBContext(Factory easyBeansFactory)
easyBeansFactory
- used to get the transaction management type.Method Detail |
---|
public EJBHome getEJBHome() throws java.lang.IllegalStateException
getEJBHome
in interface EJBContext
java.lang.IllegalStateException
- if the enterprise bean does not have a
remote home interface.public EJBLocalHome getEJBLocalHome() throws java.lang.IllegalStateException
getEJBLocalHome
in interface EJBContext
java.lang.IllegalStateException
- - if the enterprise bean does not have a
local home interface.@Deprecated public java.util.Properties getEnvironment()
getEnvironment
in interface EJBContext
@Deprecated public java.security.Identity getCallerIdentity()
getCallerIdentity
in interface EJBContext
public java.security.Principal getCallerPrincipal()
getCallerPrincipal
in interface EJBContext
@Deprecated public boolean isCallerInRole(java.security.Identity role)
isCallerInRole
in interface EJBContext
role
- The java.security.Identity of the role to be tested.
public boolean isCallerInRole(java.lang.String roleName)
isCallerInRole
in interface EJBContext
roleName
- The name of the security role. The role must be one of
the security roles that is defined in the deployment descriptor.
public javax.transaction.UserTransaction getUserTransaction() throws java.lang.IllegalStateException
getUserTransaction
in interface EJBContext
java.lang.IllegalStateException
- - The Container throws the
exception if the instance is not allowed to use the
UserTransaction interface (i.e. the instance is of a bean with
container-managed transactions).public void setRollbackOnly() throws java.lang.IllegalStateException
setRollbackOnly
in interface EJBContext
java.lang.IllegalStateException
- - The Container throws the
exception if the instance is not allowed to use this method (i.e.
the instance is of a bean with bean-managed transactions).public boolean getRollbackOnly() throws java.lang.IllegalStateException
getRollbackOnly
in interface EJBContext
java.lang.IllegalStateException
- - The Container throws the
exception if the instance is not allowed to use this method (i.e.
the instance is of a bean with bean-managed transactions).public TimerService getTimerService() throws java.lang.IllegalStateException
getTimerService
in interface EJBContext
java.lang.IllegalStateException
- The Container throws the
exception if the instance is not allowed to use this method (e.g.
if the bean is a stateful session bean)public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object lookup(java.lang.String name)
lookup
in interface EJBContext
name
- given name
public BeanType getBean()
getBean
in interface EZBEJBContext<BeanType extends EasyBeansBean>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |