This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

The benefit of pooled stateless session beans vs singleton use?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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: 39789
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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.
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!