GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 4 of 175    Print  
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.



  
Total Answers and Comments: 9 Last Update: October 17, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 17, 2005 07:50:01   #1  
Lavanya        

RE: What is Session Bean. What are the various types of Session Bean
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.

 
Is this answer useful? Yes | No
May 20, 2005 08:44:39   #2  
Mohan        

RE: What is Session Bean. What are the various types of Session Bean
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.

 
Is this answer useful? Yes | No
June 26, 2005 07:36:59   #3  
Ashutosh Gupta        

RE: What is Session Bean. What are the various types of Session Bean
Session beans are reusable components and contains the logic for business process
 
Is this answer useful? Yes | No
July 24, 2005 02:50:33   #4  
pradeep.gt        

RE: What is Session Bean. What are the various types of Session Bean
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

 
Is this answer useful? Yes | No
September 05, 2005 09:13:09   #5  
Dheeraj Tanwar        

RE: What is Session Bean. What are the various types of Session Bean
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.

 
Is this answer useful? Yes | No
September 13, 2005 08:55:55   #6  
p_kandukuri Member Since: September 2005   Contribution: 8    

RE: What is Session Bean. What are the various types o...

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.


 
Is this answer useful? Yes | No
September 29, 2005 00:55:45   #7  
dave        

RE: What is Session Bean. What are the various types o...
refer above
 
Is this answer useful? Yes | No
October 14, 2005 04:34:27   #8  
Chandana Ekanayake        

RE: What is Session Bean. What are the various types o...

 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. 


 
Is this answer useful? Yes | No
October 17, 2005 00:16:01   #9  
Balakrishnan        

RE: What is Session Bean. What are the various types o...
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.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape