Hanging threads in ejb-client when remote ejb client repeatedly throws exceptions in JBoss EAP 6
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
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.