Message Listener has wrong TCCL set causing CNF or CCE in JBoss EAP?

Solution Unverified - Updated -

Issue

I have two ears. If I send a message from one ear to the other the
messagelistenerthread is setting the wrong classloader.
You can find the bug here:

http://community.jboss.org/message/586079#586079
http://community.jboss.org/message/588787#588787

If we use the fix, it works. But the fix is not realy nice ;-)

We have two EAR files that are deployed onto a single JBoss server. Each EAR file contains a copy of a single class. Both EARs exchange messages through the Java Messaging Service. Those messages contain an object of the former mentioned class. If the receiver now tries to cast the object contained in the message JBoss will throw a ClassCastException. If each EAR file is deployed onto its own JBoss server the problem disappears. The question is: Is this behaviour intended? Does one really have to think at development time how the application will be deployed afterDillinger has two EAR files that are deployed onto a single JBoss server. Each EAR file contains a copy of a single class. Both EARs exchange messages through the Java Messaging Service. Those messages contain an object of the former mentioned class. If the receiver now tries to cast the object contained in the message JBoss will throw a ClassCastException. If each EAR file is deployed onto its own JBoss server the problem disappears.

Environment

  • JBoss Enterprise Application Platform (EAP) 5.1.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.