Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EJB Singleton Versus Stateless

 
Ranch Hand
Posts: 489
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic