-
1. Re: concurrent calls to stateful session beans
bdecoste Feb 20, 2006 4:53 PM (in response to andrewtv)Concurrent calls to a session bean instance are not allowed via the spec. Are you sharing a SFSB handle (proxy) between multiple threads?
-
2. Re: concurrent calls to stateful session beans
andrewtv Feb 20, 2006 5:01 PM (in response to andrewtv)Understood. Perhaps if there was a way to single thread access to the bean automatically as if all calls were synchronized, I suppose this is what I'm looking for -- perhaps this is more of a locking strategy. I have a web tier in which parts get composed in mutiple threads, but would like to continue using the sfsb, though I suppose another alternative would be to just switch to a plain session bean.
-
3. Re: concurrent calls to stateful session beans
bdecoste Feb 20, 2006 5:11 PM (in response to andrewtv)If there is no state between calls, then a stateless bean is the way to go. Access to a SFSB instance should be locked (via the StatefulSessionInterceptor) to force single threaded access. Could you please post a full stack trace?
-
4. Re: concurrent calls to stateful session beans
bill.burke Feb 20, 2006 5:26 PM (in response to andrewtv)no, multi threaded access to a SFSB will throw an exception by default as per the spec...
@org.jboss.annotation.ejb.SerializedConcurrentAccess will block on co -
5. Re: concurrent calls to stateful session beans
andrewtv Feb 20, 2006 5:36 PM (in response to andrewtv)Thanks, I'll try this