Hi Ranchers,
One doubt in "Operations Allowed in the Methods of a Session Bean".
From my understanding
PostConstruct, Pre-Destroy, PrePassivate,PostActivate callback
methods run in a unspecified Transaction Context. So Resource manager access and Enterprise bean access should not be allowed in these methods.
If I see the tables (Table1-page 74 and Table2-page 82 ) from ejb-3_0-pr-spec-ejbcore.pdf spec, there are some differences.
For Statefull Session beens
Operations allowed in PostConstruct, Pre-Destroy, PrePassivate,PostActivate are
1. SessionContext methods: getBusinessObject,getEJBHome, getEJBLocalHome, getCallerPrincipal,isCallerInRole, getEJBObject, getEJBLocalObject
2. JNDI access to java:comp/env
3. Resource manager access
4. Enterprise bean access
For Stateless Session beens
Operations allowed in PostConstruct, Pre-Destroy are
1. SessionContext methods: getBusinessObject,getEJBHome, getEJBLocalHome, getEJBObject,getEJBLocalObject, getTimerService
2. JNDI access to java:comp/env
As we know all the above methods are running in unspecified transaction.
Why Resource manager access and Enterprise bean access are allowed in Statefull session bean?
Can any body please help me to understand the difference here?
Regards,
Chittaranjan