EJB design: setEntityContext and setSessionContext
What is the actual use of
- Posted by: kirubakaran damodaran
- Posted on: April 16 2003 23:56 EDT
The SessionContext and EntityContext encapsulate the beans contract with the container.
When the EJB is created these methods are called and the context is passed in for the bean to store if it wishes.
From a pratical stand point the context allows you access to the users principle and role information, and the ability to set the rollback flag.