0% found this document useful (0 votes)
60 views5 pages

Entity Beans: ID TX + Sec + Res Home + Jndi

This document provides a summary of the different methods and capabilities available to different types of enterprise Java beans, including entity beans, session beans, and message-driven beans, and whether they support container-managed or bean-managed transactions. It uses legends to define abbreviations for things like home interfaces, primary key access, transaction management, security roles, and resource access.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views5 pages

Entity Beans: ID TX + Sec + Res Home + Jndi

This document provides a summary of the different methods and capabilities available to different types of enterprise Java beans, including entity beans, session beans, and message-driven beans, and whether they support container-managed or bean-managed transactions. It uses legends to define abbreviations for things like home interfaces, primary key access, transaction management, security roles, and resource access.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Does Not Exist

Pooled
Ready
newInstance()
setEntityContext(ec) unsetEntityContext()
ejbHome<METHOD>(args)
ejbFind<METHOD>(args)
ejbSelect<METHOD>(args)
ejbActivate() ejbPassivate()
ejbCreate<METHOD>(args)
ejbPostCreate<METHOD>(args)
ejbRemove()
ejbLoad()
ejbStore()
ejbSelect<METHOD>(args)
Business
methods
ID
Legend:
HOME: access to getEJB[Local]Home()
ID: access to getEJB[Local]Object() and getPrimaryKey()
Tx: access to getRollbackOnly() and setRollbackOnly()
Sec: access to getCallerPrincipal() and isCallerInRole(String)
JNDI: access to java:comp/env
Res: access to Resource manager and enterprise beans
Note:
ejbFind and ejbSelect methods are
not implemented by the bean provider, so no
operations may be invoked from them.
Tx + Sec + Res
HOME + JNDI
Entity beans
System exception thrown
CMT Stateful session beans
Legend:
HOME: access to getEJB[Local]Home()
ID: access to getEJB[Local]Object()
Tx: access to getRollbackOnly() and setRollbackOnly()
Sec: access to getCallerPrincipal() and isCallerInRole(String)
JNDI: access to java:comp/env
Res: access to Resource manager and enterprise beans
Does Not Exist
Ready
Ready in Tx
newInstance()
setSessionContext(sc)
ejbCreate<METHOD>(args) ejbRemove()
noTxMethod(args)
ejbPassivate()
afterCompletion(false)
afterCompletion(true)
beforeCompletion()
afterBegin()
noTxMethod() or
differentTxMethod()
System exception thrown
Passive
ejbActivate()
txMethod()
ERROR
Time out
HOME + JNDI
Tx
Sec
ID
Res
Note:
afterCompletion belongs to the SEC and ID groups
but it does not belong to the Res group!!
Legend:
HOME: access to getEJB[Local]Home()
ID: access to getEJB[Local]Object()
Tx: access to getUserTransaction()
Sec: access to getCallerPrincipal() and isCallerInRole(String)
JNDI: access to java:comp/env
Res: access to UserTransaction interface, Resource manager, and enterprise beans
Does Not Exist
Ready
newInstance()
setSessionContext(sc)
ejbCreate<METHOD>(args) ejbRemove()
Business
method
ejbPassivate()
System exception thrown
Passive
ejbActivate()
Time out
HOME + JNDI
Tx + Sec + ID + Res
BMT Stateful session beans
Stateless session beans
Does Not Exist
Ready
newInstance()
setSessionContext(sc)
ejbCreate()
Business
method
HOME + JNDI
ejbRemove()
ID
Tx + Res + Sec
Legend:
HOME: access to getEJB[Local]Home()
ID: access to getEJB[Local]Object()
Tx: access to getRollbackOnly() and setRollbackOnly()
Sec: access to getCallerPrincipal() and isCallerInRole(String)
JNDI: access to java:comp/env
Res: access to Resource manager and enterprise beans
CMT BMT
Does Not Exist
Ready
newInstance()
setSessionContext(sc)
ejbCreate()
Business
method
HOME + JNDI
ejbRemove()
Tx + ID
Res + Sec
Legend:
HOME: access to getEJB[Local]Home()
ID: access to getEJB[Local]Object()
Tx: access to getUserTransaction()
Sec: access to getCallerPrincipal() and isCallerInRole(String)
JNDI: access to java:comp/env
Res: access to UserTransaction interface, Resource manager, and
enterprise beans
Message-driven beans
Does Not Exist
Ready
newInstance()
setMessageDrivenContext(mdc)
ejbCreate()
onMessage(msg)
JNDI
ejbRemove()
Tx + Res
Legend:
Tx: access to getRollbackOnly() and setRollbackOnly()
JNDI: access to java:comp/env
Res: access to Resource manager and enterprise beans
CMT BMT
Does Not Exist
Ready
onMessage(msg)
JNDI
ejbRemove()
Tx
Res
Legend:
Tx: access to getUserTransaction()
JNDI: access to java:comp/env
Res: access to UserTransaction interface, Resource manager, and
enterprise beans
newInstance()
setMessageDrivenContext(mdc)
ejbCreate()

You might also like