[jboss-user] [EJB/JBoss] - Re: Are Stateless Session EJB Thread-safe

dimitris@jboss.org do-not-reply at jboss.com
Mon Dec 17 04:19:10 EST 2007


What you miss is that SLSBs *can* have internal state, e.g. a cached datasource handle that they re-use to serve incoming requests.

Stateless is the interpretation from a client's point of view, so if a SLSB has 3 methods, a client should be able to call those methods on different bean instances, without that making any difference in the total outcome.

The single thread guarrantee of EJBs makes writing those beans easy, so you don't have to think about concurrency issues. It also scales well as the server will create as many SLBSs as they are needed to handle the load.

What you describe is a simple RMIServer singleton that must know how to deal with concurrent requests. That's a very different thing from EJBs.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113305#4113305

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113305



More information about the jboss-user mailing list