[jboss-dev-forums] [JBoss AS 7 Development] - EJBCLIENT000024: No EJB receiver available for handling

Michael Gronau do-not-reply at jboss.com
Tue Aug 14 06:30:35 EDT 2012


Michael Gronau [https://community.jboss.org/people/Michael_Gronau] created the discussion

"EJBCLIENT000024: No EJB receiver available for handling"

To view the discussion, visit: https://community.jboss.org/message/753527#753527

--------------------------------------------------------------
Hi,
During some stress-testing our application, i get this exception, when we create multiple EJBClientContext Objects in different threads simultaniously (only in some of those threads):

java.lang.IllegalStateException : EJBCLIENT000024: No EJB receiver available for handling [appName:jas-application, moduleName:core-ejb, distinctName:] combination
    at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:522)
    at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:161)
    at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:135)
    at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:113)
    ... 9 more

In our case this exception occurs in at least 1 Thread when connecting and looking up a stateful bean with more than 10 Threads at the same time.

Some debugging around this has shown that this exception is thrown because of a hard-coded timeout value in the class org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.associate(). The code line has a TODO:

|      | boolean successfulHandshake = false; |
|      | try { |
|          | // wait for the handshake to complete |
|          | *// TODO: Think about externalizing this timeout* |
|          | *successfulHandshake = versionHandshakeLatch.await(5, TimeUnit.SECONDS);* |
|          | if (successfulHandshake) { |
|              | final Channel compatibleChannel = versionReceiver.getCompatibleChannel(); |
|              | final ChannelAssociation channelAssociation = new ChannelAssociation(this, context, compatibleChannel, this.clientProtocolVersion, this.marshallerFactory, this.reconnectHandler); |
|              | synchronized (this.channelAssociations) { |
|                  | this.channelAssociations.put(context, channelAssociation); |
|              | } |
|              | Logs.REMOTING.successfulVersionHandshake(context, compatibleChannel); |
|          | } else { |
|              | // no version handshake done. close the context |
|              | Logs.REMOTING.versionHandshakeNotCompleted(context); |
|              | context.close(); |
|          | } |
|      | } catch (InterruptedException e) { |
|          | context.close(); |
|      | } |

When stressing the remote ejb client enough the client EJBClientContext is closed silently (because version handshake was not done within 5 seconds) and so no ejb receivers are available.
I think, to make the timeout configurable would be a perfect solution for us.
Should I create an Issue in JIRA?

With best regards,
Michael
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/753527#753527]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120814/361b0502/attachment.html 


More information about the jboss-dev-forums mailing list