JBoss Community

Re: EJB bean is not working in Multi threading of JBoss 7.1.1 Final

created by Oliver Katzer in JBoss AS 7 Development - View the full discussion

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.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community