Session Bean

What Does Session Bean Mean?

A session bean represents a single Java Platform 2, Enterprise Edition (J2EE) server application, which handles business tasks for its client inside the server.

Advertisements

When a user and computer exchange a dialog, an interactive session occurs. A session bean resembles an interactive session in that a session bean has only one client. After a client terminates, the session bean also ends, as does the relationship between the session bean and the client.

Techopedia Explains Session Bean

When a client accesses a server application, the client session bean begins. After the client stops, the session bean stops and is no longer related to the client. Stateful session beans and stateless session beans are the two types of session beans.

Stateful session bean instance variables, which indicate the state of the client-bean interaction, are retained for the client-bean interaction period. The state is no longer retained when interaction ends. Stateless session bean instance variables (those containing the state of the session) are retained as long as the method is invoked. The state is not retained for the entire session duration.

There are two critical circumstances where session beans should be used. One is when only one client will be accessing a bean instance during a particular period of time. The second is when the state of the bean need not remain persistent, meaning it will only last a few hours.

Advertisements

Related Terms

Latest Servers Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…