I've also posted a question on the activeMQ forum that has the code I'm trying to test with the below settings - in case this gets sorted out and it can help someone else:
I'm trying to deploy an EJB packaged in an EAR on JBoss EAP 7. The EJB needs to publish to a JMS queue on an existing JBoss EAP 6 server
I'm trying to get this example:
However I'm a little stuck as to this part for the InitialContext Properites:
connectionFactory.jms/ConnectionFactory=tcp://legacy server address:5445? \
And this part:
My code currently has:
factory = (QueueConnectionFactory) ctx.lookup("java:/System/MyCompany/ApplicationType/Management/Application/12-12;2-0;AMP/Comp/QueueConnectionFactory");
queue1 = (Queue) ctx.lookup("java:/com/mycompany/apackage/imp/anothercompany/ejb/NotificationQueue");
I imagine the first question would be what port is 5445 with regards to the socket binding ports in standalone-full-ha.xml? This server doesnt run on standard ports as theres an offset, hence the 10202's below, I believe thats the naming ports configured for the server.
The second question would be on the queue env entry, would this "queue.jms/myQueue=myQueue" simply become this "queue.jms/NotificationQueue=NotificationQueue"
Also, for multiple servers in a cluster, is this syntax still supported in the InitialContext Properites:
Any help would be greatly appreciated. I had gone the route of trying to bundle the JBoss EAP 6 related libraries with the application and specifying the following in the jboss-deployment-structure:
Update - xml code tag isnt working all that great so re-adding:
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 "org.jboss.ejb.client.EJBClientContext.registerConnection(Lorg/jboss/remoting3/Connection;)V" 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