Bean things you can do in ejbActivate() and ejbPassivate()

image with no caption

ejbPassivate()

ejbActivate()

Use your SessionContext to:

Use your SessionContext to:

get a reference to your home

get a reference to your home

get a reference to your EJB object

get a reference to your EJB object

get security information about the client

get security information about the client

force a transaction to rollback (CMT beans)

force a transaction to rollback (CMT beans)

find out if the transaction has already been set to rollback (CMT beans)

find out if the transaction has already been set to rollback (CMT beans)

get a transaction reference, and call methods on it (BMT beans)

get a transaction reference, and call methods on it (BMT beans)

Access:

Access:

your special JNDI environment

your special JNDI environment

another bean’s methods

another bean’s methods

a resource manager (like a database)

a resource manager (like a database)

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.