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?