EJB reconnect issue between 2 servers with 7.1.1.Final
jasipher Jun 7, 2012 2:20 PMServer A hosts an EAR containing one stateless EJB.
Server B hosts an EAR containing multiple web applications and EJBs.
The EJB on server A uses 3 of the EJBs hosted on server B.
One of the web apps on server B uses the EJB on server A plus several of the EJBs on server B.
When I first start both servers everything works fine.
If I restart server A, the web app on server B is able to reconnect to the EJB on server A without any problem, but when the EJB on server A tries to connect to one of the EJBs on server B it fails with an InvocationTargetException caused by my new favorite problem
java.lang.IllegalStateException: No EJB receiver available for handling [appName:myapp,modulename:mymodule,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@4452bcae
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
at $Proxy99.create(Unknown Source) ... 38 more
If I restart server B the reverse is true - server A is able to reconnect to the EJBs on server B, but the web app on server B gets the ever popular "No EJB receiver available..." message when it tries to use the EJB on server A.
jboss-ebj-clilent.xml on server A looks like this:
<jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">
<client-context>
<ejb-receivers>
<remoting-ejb-receiver outbound-connection-ref="serverb-connector"/>
</ejb-receivers>
</client-context>
</jboss-ejb-client>
and on server B it looks like this:
<jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">
<client-context>
<ejb-receivers>
<remoting-ejb-receiver outbound-connection-ref="servera-connector"/>
</ejb-receivers>
</client-context>
</jboss-ejb-client>
The result is that if I have to restart one server I have to restart both, and that's not a good solution.
Any suggestions for working around this would really be appreciated.