========================================================================= Operations allowed in the methods of a stateful SessionBean with container-managed transaction demarcation ========================================================================= Bean method | Bean method can perform the following operations ______________________|__________________________________________________ | constructor | - ______________________|__________________________________________________ | setSessionContext | SessionContext methods: | - getEJBHome | JNDI access to java:comp/env ______________________|__________________________________________________ | ejbCreate | SessionContext methods: ejbRemove | - getEJBHome ejbActivate | - getCallerPrincipal ejbPassivate | - isCallerInRole | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________ | business method | SessionContext methods: from remote interface | - getEJBHome | - getCallerPrincipal | - getRollbackOnly | - isCallerInRole | - setRollbackOnly | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________ | afterBegin | SessionContext methods: beforeCompletion | - getEJBHome | - getCallerPrincipal | - getRollbackOnly | - isCallerInRole | - setRollbackOnly | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________ | afterCompletion | SessionContext methods: | - getEJBHome | - getCallerPrincipal | - isCallerInRole | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________
Bean method | Bean method can perform the following operations ______________________|__________________________________________________ | setSessionContext | SessionContext methods: | - getEJBHome | JNDI access to java:comp/env ______________________|__________________________________________________
Bean method | Bean method can perform the following operations ______________________|__________________________________________________ | ejbCreate | SessionContext methods: ejbRemove | - getEJBHome ejbActivate | - getCallerPrincipal ejbPassivate | - isCallerInRole | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________
Bean method | Bean method can perform the following operations ______________________|__________________________________________________ | business method | SessionContext methods: from remote interface | - getEJBHome | - getCallerPrincipal | - getRollbackOnly | - isCallerInRole | - setRollbackOnly | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________
Bean method | Bean method can perform the following operations ______________________|__________________________________________________ | afterBegin | SessionContext methods: beforeCompletion | - getEJBHome | - getCallerPrincipal | - getRollbackOnly | - isCallerInRole | - setRollbackOnly | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________
Bean method | Bean method can perform the following operations ______________________|__________________________________________________ | afterCompletion | SessionContext methods: | - getEJBHome | - getCallerPrincipal | - isCallerInRole | - getEJBObject | JNDI access to java:comp/env | Resource manager access | Enterprise bean access ______________________|__________________________________________________