aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes The benefit of pooled stateless session beans vs singleton use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "The benefit of pooled stateless session beans vs singleton use?" Watch "The benefit of pooled stateless session beans vs singleton use?" New topic
Author

The benefit of pooled stateless session beans vs singleton use?

Brick Riccardi
Greenhorn

Joined: Jun 01, 2008
Posts: 22
I'm curious what performance advantages do you get (if any?) using a
pool of stateless session beans vs a single instance of an object
(singleton)?

For example, imagine first a non clustered application where initial
communication comes in through a servlet.

From my understanding way back when I studied this stuff, containers
create single instances of each servlet (yea I know that can be
altered but everything I read back in the day said you don't want to
mess with changing the instances of servlets created.) Now lets assume
the doPost does a local ejb lookup and gets you a local stateless
session bean. The container will create a pool of these beans, but
does that actually give you a performance gain over your servlet just
calling a method from a singleton pojo? If so how? I can see for
asynchronous stuff with mdbs how a pool helps - but what do you gain
from a pool of stateless session beans (assuming you are comparing to
using singletons.)

I'm probably missing some basic concept here - so someone fill me in thanks
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31054
    
162

Brick,
Welcome to JavaRanch! This must be a popular question. We just discussed it last month. Here's a link to that thread. Feel free to reply with a follow up if you have more questions after reading the discussion in that thread.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The benefit of pooled stateless session beans vs singleton use?