Hi there.
We are migrating from JBoss5 to JBoss7 and faced the same problem.
Thread-A creates the InitContext and does the JNDI EJB lookup and creates the instance of the EJB remote inferface.
Thread-A can invoke methods via the EJB remote interface.
Thread-B gets the reference of the EJB remote interface.
But if Thread-B tries to invoke a method via the EJB remote interface following exception is thrown:
Exception in thread "xxx" java.lang.IllegalStateException: No EJBReceiver available for node name oliver2
at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:613)
at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:648)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:71)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
Of course accessing the remote interface is serialized via synchronized blocks.
I use the same Context properties like Bijoy James.
Under JBoss5 this has been working.
How I can Thread-B allow using the remote interface, which was created from Thread-A?
Thanks in advance for any help.