Concurrent calls on a SFSB are not allowd by spec. Weblogic allows something like this, but they are only synchronising calls. on the same SFSB instance.
You don't have to split your facade, just synchronise the calls.
I hope your facade is not build on EJBs itself, because you must not do thread management and synchronisation in there.
The synchronization behavior could be encapsulated within the stateful session proxy via a custom client side interceptor if all users are doing so through the same instance.
I am having the same problem and trying to solve it using container interceptors instead of client interceptors since the EJB clients will not be going through the same client.
Can I use a built in JBoss interceptor and plug it in the container interceptor list or do I have to write one. I have been trying to write a simple interceptor , overriding the invoke method but I am unable to find the object on which I should synchronize on .. I have tried
any ideas what should i sync on
I need to know what is x and how do I get it.
AFAIK, every container has its own instances of interceptors. Why not introducing an attribute in your interceptor which you can use for synchronisation?
I would rather think about not using synchronisation blocks by myself but using the oswego tools, which even come with jboss (concurrent.jar). The reentrant lock could be helpful for solving your problem: