[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Artemis (JBoss EAP 7) to HornetQ (EAP 6) elaboration on RedHat example

Hi All!

I posted a question in the JBoss forums:

But thought I might get a little quicker help here.  The problem I am having
and trying to solve is that as per that article I had originally gone the
route of trying to bundle the JBoss EAP 6 related libraries with the EJB
application and specifying the following in the EAR
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
            <subsystem name="messaging-activemq"></subsystem>
            <module name="javax.jms.api"></module>
            <module name="org.jboss.ejb"></module>
            <module name=""></module>

Which works on initial deployment however when I restart the server I get
the following exception when trying to send a JMS message so it appears that
the jboss-deployment-structure isn't always being honored.  I also end up
getting that exception at random intervals (a day, days or weeks later) and
when it occurs all future JMS messages fail to be sent almost as if JBoss
forgets the application is supposed to be using its own libraries.

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving method
the class loader (instance of org/jboss/modules/ModuleClassLoader) of the
current class,
org/jboss/naming/remote/client/ejb/RemoteNamingStoreEJBClientHandler, and
the class loader (instance of org/jboss/modules/ModuleClassLoader) for the
method's defining class, org/jboss/ejb/client/EJBClientContext, have
different Class objects for the type org/jboss/remoting3/Connection used in
the signature

So as per that same forum post, I'm now trying to use Red Hats overly
simplified (at least to me) example here:

But since I was using JNDI - I'm really confused as to how to setup the
connection factory and queue - does anyone by chance have a working example? 
I can add all the code after I clean it up a bit if it helps!

Thank you!


Sent from: