• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Singleton Versus Stateless

 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring 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
Java Spring 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic