• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

EJB Singleton Versus Stateless

 
Ranch Hand
Posts: 489
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello jRanchers

I would like to exchange some ideas about the EJB 3.1.
The question that bothers me is where we must use stateless session bean since we now have the new type singleton bean. In my head, I believe most stateless session bean can be replaced by singleton bean ...
Why keep a pool of stateless session bean since you could be processing all requests with just one singleton bean? I believe this is even a good thing in its scalability, in which you spend only 1 object instead of a pool.
Before EJB 3.1, EJB layers to DAO's and Service's were all defined as stateless in ejb because we did not have to use them as a singleton ... but now ... it is possible to believe that the stateless ejb type will end up falling in depreciation soon.
What is the opinion of you guys?
When using stateless over singleton?
Regards.
 
Fernando Franzini
Ranch Hand
Posts: 489
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really do not understand why my post removed to another forum since this relates to the decision related to part 2 of OCMJEA.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic