What is Session Bean. What are the various types of Session Bean


Answer posted by Mohan on 2005-05-20 08:44:39: SessionBeans typically are used to represent a client they are of two typse 
 
Stateful Session Beans : they maintain conversational state between subsequest calls by a client 
 
Stateless Session Bean : consider this as a servlet equivalent in EJB. It is just used to service clients regardless of state and does not maintain any state.

Showing Answers 1 - 9 of 9 Answers

Lavanya

  • Apr 17th, 2005
 

SessionBeans: They are usually associated with one client. Each session bean is created and destroyed by the particular EJB client that is associated with it. These beans do not survive after system shutdown. 
 
These Session Beans are of two types: 
 
a) Stateless Session Beans : These beans do not have internal States. They need not be passivated.  
They can be pooled into service multiple clients. 
 
b) Stateful Session Beans : These beans have internal states. They can be stored (getHandle()) and restored (getEJBObject()) across client sessions.Since they can be persistence, they are also called as Persistence Session Beans.

Mohan

  • May 20th, 2005
 

SessionBeans typically are used to represent a client they are of two typse 
 
Stateful Session Beans : they maintain conversational state between subsequest calls by a client 
 
Stateless Session Bean : consider this as a servlet equivalent in EJB. It is just used to service clients regardless of state and does not maintain any state.

Ashutosh Gupta

  • Jun 26th, 2005
 

Session beans are reusable components and contains the logic for business process

  Was this answer useful?  Yes

pradeep.gt

  • Jul 24th, 2005
 

session bean are used to maintain a convesation between client and server 
 
state less session bean state will end once the request processed 
 
state full session bean state will be remembered until user exits the session or the session made invalidate

  Was this answer useful?  Yes

Dheeraj Tanwar

  • Sep 5th, 2005
 

session bean has conversational state of an user. it is maintained by the container untill user does not close browser. one more importent thing to consider that if an user open more than one browser , still there is only one session so he/she can't access from more than one browser. 
stateless session bean are used in JMS (java messaging services). because there is no nedd to maintain session.

  Was this answer useful?  Yes

p_kandukuri

  • Sep 13th, 2005
 

Try to use less Stateful session beans and use Stateless session beans in you application for performance.

Stateless session beans can be pooled(Using free-pool in application server). where as stateful can't.

  Was this answer useful?  Yes

dave

  • Sep 29th, 2005
 

refer above

  Was this answer useful?  Yes

Chandana Ekanayake

  • Oct 14th, 2005
 

 Ok,If you want to find the inverse of a Matrix then We can use session been encapsulated the logic of finding inverse of a matrix, is an example for stateless session been. Here there is no subsequent request and no need to persist the data. The logic of finding the inverse is encapsulated in the been.

A good example for stateful session been is a shopping CART. We have to maintain a session with the custermor cos` customer spends few times to chose items and we need to keep a coonection with the customer. 

  Was this answer useful?  Yes

Balakrishnan

  • Oct 17th, 2005
 

Session bean is encapsulates the business logic. and carry out the task for behalf of the client. It have two types.one is stateful session bean. this is maintain the convesional state.another one is stateless session bean. donot maintain the conversional.state.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions