What do you mean stateful and stateless session bean?
Stateful Session bean:-
- Stateful session bean maintain the state of the conversation between the client and itself
- When the client invokes a method on the bean the instance variables of the bean may contain a state but only for the duration of the invocation
- implements the javax.ejb.SessionBean interface and is deployed with the declarative attribute "stateful"
Stateless session bean:-
- A stateless session bean is an enterprise bean that provides a stateless service to the client.
- Conceptually, the business methods on a stateless session bean are similar to procedural applications or static methods; there is no instance state, so all the data needed to execute the method is provided by the method arguments
- implements the javax.ejb.SessionBean interface and is deployed with the declarative attribute "stateless
See the following video on Factory Pattern in Hibernate: -
Click to get Java Training
Regards,
Get more Java Training from author’s blog
http://
http://
Contributed by:
Shivprasad Koirala
We conduct training for Java/J2EE technologies like design patterns, J2EE, Struts, Hibernate, Spring, Rich Interface etc. and likes to write articles on the same in free time.
Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=631
Click here to go on website
|