• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

The benefit of pooled stateless session beans vs singleton use?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic