[jboss-user] [EJB 3.0] - Re: SLSB basic design question

ALRubinger do-not-reply at jboss.com
Mon Aug 18 12:43:31 EDT 2008


Peter is right, though for the wrong reason. :)

SLSBs *do* have state, as the instance is returned to the Pool after use.  Therefore invocation-specific data should not be kept in instance members of a SLSB.  For SFSB this is acceptable (and good practice) because it's guaranteed that every subsequent invocation upon a given proxy will invoke upon the same SFSB instance.

However, EJBs are Thread-safe - no two invocations will use the same instance concurrently (by spec anyway):

"EJB 3.0 Core Specification 4.7.11" wrote : The container must ensure that only one thread can be executing an instance at any time.

S,
ALR

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

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



More information about the jboss-user mailing list