Remote EJB client hangs trying to connect to a clustered EJB which has not fully started in JBoss EAP 6.1.x
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.0.x
- 6.1.x
Issue
-
I have two EJBs in my application. One of them is defined to run at Startup and is singleton. The other one is a SLSB Clustered EJB. I want the Clustered EJB to start serving request only after the Startup EJB has completed its loading activity. Is there a way to do it?
-
If an EJB injects or depends on a resource such as an @Singleton which has not been started, the EJB's remote interface java:jboss/exported/* is already bound and this allows remote EJB clients to try to invoke it. This causes the EJB clients to hang because the EJB will not be started until its dependencies have been started.
-
Why does the EJB communication (with the nodes already running) pause while the client sets up the connection/channels to the new node - shouldn´t it happen in parallel?
Resolution
Upgrade to JBoss EAP This content is not included.6.2.0 or later.
For JBoss EAP 6.1.1 there is a one off patch available from This content is not included.here.
Root Cause
EJB should not be remotely accessible until all of its dependencies have been started
This content is not included.This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=1019894
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.