JBoss Community

Re: Calls against multiple servers from a single client

created by Tarek Hammoud in JBoss AS 7 Development - View the full discussion

Hello Wolf,

 

There is no (nor there should be and) affinity between a thread and an EJB proxy. The user can execute against an EJB proxy from ANY thread and not just the one that created it. It is at invocation time, the proper EJB context (Stored in the proxy code above) needs to be setup so that the EJBInvoker code from JBOSS sees the "right" context for THAT thread. Today, EJBContext has SELECTOR as a static so all threads will trample on each other when the code calls requireCurrent from multiple threads.

 

 

I hope I answered your question. Thank you for all your help in this.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community