Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Java > Enterprise JavaBeans > Session Beans

Session Beans

Session beans represent non-persistent server-side components that may be transaction aware. Typically, session beans model processes, services, and client-side sessions. As before, a session bean may be stateful or stateless. A stateful session bean maintains session data for its client between operations. Thus, it is often used to model services such as shopping carts and bank tellers--services that usually require multiple steps or operations. Stateless session beans are lightweight, scalable components that are used to model services that do not maintain session data for the client.

On-Demand Stateful EJBs (ONJava.com)
EJB session beans can be stateful or stateless, but they can't easily change from one to the other. That can be a problem in certain business situations. Swaminathan Radhakrishnan has a pattern that he says can address this problem.

EJB Inheritance, Part 4 (ONJava.com)
This series has demonstrated all sorts of ways to handle inheritance in beans. With web and message services, though, how do you handle inheritance with remotely-invoked beans? The EJB 2.0 specification allows it; Emmanuel Proulx demonstrates how.

EJB Inheritance, Part 3 (ONJava.com)
Session beans can take advantage of inheritance, just like entity beans. Indeed, implementing session bean inheritance is nowhere near as hard as it is with entity beans. Part 3 of this series shows the proper technique for implementing inheritance in session beans and addresses the use of factories.

Business Logic, Part 3 (ONJava.com)
In Part 3 of our excerpt from Building Java Enterprise Applications (Vol. 1, Architecture), Brett McLaughlin addresses issues of statelessness and statefulness.

Business Logic, Part 1 (ONJava.com)
In this excerpt from Chapter 8 of Building Java Enterprise Applications, Vol I: Architecture, Brett McLaughlin discusses the façade pattern, in which you use session beans to access entity beans. This access method is used instead of allowing direct access to entity beans, and is key to a sound strategy in building enterprise applications.


Resources and links: