This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
For stateful Session Bean - You can access resource manager, other beans from ejbCreate(), ejbRemove(), ejbActivate(), ejbPassivate() - Methods ejbCreate(), ejbRemove(), ejbActivate(), ejbPassivate() runs in 'unspecified transaction context'
Now tell me, how can you access other beans / resource managers from 'unspecified transacrtion context' - i think they can be accessed only from transactional context.
Here is what the specs mention on this subject P364
==================================================================== The EJB specification does not prescribe how the Container should manage the execution of a method with an unspecified transaction context�the transaction semantics are left to the Container implementation. ====================================================================
so to answer your question accessing other beans / resource managers is left solely to the implementation of the container. The specs give some examples of possible solutions .......
===================================================================== ->The Container may execute the method and access the underlying resource managers without a transaction context. ->The Container may treat each call of an instance to a resource manager as a single transaction (e.g. the Container may set the auto-commit option on a JDBC connection). ->The Container may merge multiple calls of an instance to a resource manager into a single transaction. ->The Container may merge multiple calls of an instance to multiple resource managers into a single transaction. ->If an instance invokes methods on other enterprise beans, and the invoked methods are also designated to run with an unspecified transaction context, the Container may merge the resource manager calls from the multiple instances into a single transaction. ->Any combination of the above. =====================================================================