Cluster failover of EJB2 Stateless Session Bean (client proxy) did not work

Solution Verified - Updated -

Issue

Two (or more) servers contain a EJB2 StatelessSessionBean in cluster mode.

A (remote) client application that uses these EJBs.

The problem is:

  • When both servers are started, the client requests are routed on both servers in a sequential and everything works normally.
  • When the first server is down, all client requests are redirected correctly to the second server, and everything works normally.
  • If second server is stopped and it starts the first server, both servers are down for a moment, the client application can not find the EJB server, and an exception is shown

    org.jboss.invocation.ServiceUnavailableException: 1921622105 Service  unavailable for calling method throws java.rmi.RemoteException public  abstract *****, javax.ejb.CreateException at  org.jboss.invocation.unified.interfaces.UnifiedInvokerHAProxy.invoke  (UnifiedInvokerHAProxy.java: 387) 
    at org.jboss.invocation.InvokerInterceptor.invokeInvoker (InvokerInterceptor.java: 365) 
    at org.jboss.invocation.InvokerInterceptor.invoke (InvokerInterceptor.java: 197) 
    at org.jboss.proxy.ejb.RetryInterceptor.invoke (RetryInterceptor.java: 177)
    at org.jboss.proxy.TransactionInterceptor.invoke (TransactionInterceptor.java: 61)
    at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke (SecurityContextInterceptor.java: 64)
    at org.jboss.proxy.SecurityInterceptor.invoke (SecurityInterceptor.java: 68)
    at org.jboss.proxy.ejb.HomeInterceptor.invoke (HomeInterceptor.java: 184)
    at org.jboss.proxy.ClientContainer.invoke (ClientContainer.java: 101)
    Proxy578.create at $ (Unknown Source)
    

Environment

JBoss Enterprise Application Platform (EAP)

  • 4.x
  • 5.x

with clustered application deployment

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content