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 139 of 175    Print  
Why don't stateful session beans have a pool?

  
Total Answers and Comments: 4 Last Update: December 13, 2006     Asked by: Krishna Reddy 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 06, 2006 00:14:45   #1  
Rajesh        

RE: Why don't stateful session beans have a pool?

stateful session beans get instantiated once for each seperate client request and it stores the client information in it, there is no threading concept in EJB hence if there will be an instance pool will exist then there is a possiblity of information leak between different session objects.

therefore there is no concept of instance pooling in stateful session bean.


 
Is this answer useful? Yes | No
August 11, 2006 01:38:53   #2  
Srinivas Gorityala        

RE: Why don't stateful session beans have a pool?

Incase of stateful session beans we usually use pooling concept.Incase of pool if client request comes a bean instance willbe taken and further operaions willbe done.After completion of operation bean instance won't remember state of client,so that bean instance canbe used once again for another client.

but in stateful session beans it requires state rememberance.so if a bean instance is provided for a client ,that is only for that client,it willnot be given to other client,so in his siuation passivation,acivation processes will come out.

pool is also same as cache,but pool won't remember state of client.


 
Is this answer useful? Yes | No
October 15, 2006 18:09:25   #3  
Sankar        

RE: Why don't stateful session beans have a pool?
Hi,


We know that Stateful session beans are maintained a conversational state between the clients...and Stateful session bean's instance is only for a particular client ..the other clients can't use this instance io order access bean's method...


Instance pooling means that instances are grouped by the container for servicing the client's request...If we use instance pooling in Stateful Session Bean then the container takes more time to create the bean instances than it needs time to service those requests...It results the reduce in performance....



So we don't use instance pooling technique in Stateful Session Bean...



But in the case of Stateless Session beans we can use instance pooling in order to increase the performance....Because Stateless session beans don't maintain conversational state with the clients.it is possible to use the same instance for multiple clients...So a small no of instances can service a large no of clent's requests.....

 
Is this answer useful? Yes | No
December 13, 2006 00:36:03   #4  
keshab        

RE: Why don't stateful session beans have a pool?
in statefull session bean there is 1to 1 mapping between ejbObject and bean instenace , there is no need of pool
 
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