O'Reilly logo

Enterprise JavaBeans, Second Edition by Richard Monson-Haefel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Session Beans

Stateless Session Beans

Life cycle state diagram of the stateless session bean

Figure B-6. Life cycle state diagram of the stateless session bean

Creation and removal of the stateless session bean

Figure B-7. Creation and removal of the stateless session bean

Table 2.3 and Table 2.4 summarize the operations that are legal for a stateless session bean.

Table B-3. Allowed Operations for Stateless Session Beans in EJB 1.1

Allowed Operations

Method

Container-Managed Transactions

Bean-Managed Transactions

setSessionContext()

EntityContext methods:

getEJBHome()

JNDI ENC contexts:

Properties java:comp/env

EntityContext methods:

getEJBHome()

JNDI ENC contexts:

Properties java:comp/env

ejbCreate()

ejbRemove()

EntityContext methods:

getEJBHome()
getEJBObject()

JNDI ENC contexts:

Properties java:comp/env

EntityContext methods:

getEJBHome()
getEJBObject()
getUserTransaction()

JNDI ENC contexts:

Properties java:comp/env

business methods

EntityContext methods:

getEJHome()
getCallerPrincipal()
isCallerInRole()
getRollbackOnly()
setRollbackOnly()
getEJObject()

JNDI ENC contexts:

Properties java:comp/env
Resource Managers java:comp/env/jdbc
EJB references java:comp/env/ejb

EntityContext methods:

getEJHome()
getCallerPrincipal()
isCallerInRole()
getEJObject()
getUserTransaction()

JNDI ENC contexts:

Properties java:comp/env
Resource ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required