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
Externalizable
object in differentthreads
.
If one throws anIOException
in thewriteExternal
method (on the JBoss server), the ObjectOutput from the otherEJB call
is closed so on that call, we get “Stream is closed”.
Expect that theEJB call
which throws theIOException
should fail but the other one should not.- Test Case
- Preparing an
EJB
with a method call which returns anExternalizable
object. - On the client starts two separate threads calling the same
EJB
method. One will returns a validexternalizable object
and the other returns a bad one resulting anIOException
to be thrown. - Control the order so the
IOException
is thrown first. - Now return the valid
externalizable object
which should return successfully but we get aStream is closed
exception.
- 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.