Hanging threads in ejb-client when remote ejb client repeatedly throws exceptions in JBoss EAP 6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4
Issue
- Repeatedly throwing an Exception (in an ejb) which is missing from the client classpath will eventually cause client threads to deadlock if the Exceptions contains a sufficiently large message.
This bug is reproduced in EAP 6.0.1 / 6.1.1 / 6.2.0 / 6.3.0/6.4 - One the same client, issues with two EJB calls that returns an
Externalizableobject in differentthreads.
If one throws anIOExceptionin thewriteExternalmethod (on the JBoss server), the ObjectOutput from the otherEJB callis closed so on that call, we get “Stream is closed”.
Expect that theEJB callwhich throws theIOExceptionshould fail but the other one should not.- Test Case
- Preparing an
EJBwith a method call which returns anExternalizableobject. - On the client starts two separate threads calling the same
EJBmethod. One will returns a validexternalizable objectand the other returns a bad one resulting anIOExceptionto be thrown. - Control the order so the
IOExceptionis thrown first. - Now return the valid
externalizable objectwhich should return successfully but we get aStream is closedexception.
- Preparing an
- Test Case
Resolution
Apply JBoss EAP 6.4 Cumulative Patch (CP) 6 or later
Root Cause
This content is not included.BZ-1276513 - EJB Server side is needlessly closing remoting channel
SBR
Components
Category
Tags
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.