Skip to content
Advertisement

JMS client to ActiveMQ at server on Red Hat JBoss EAP 7.3 in Java

I am writing a Java client to connect to my JBoss EAP 7.3 server running ActiveMQ, and I am getting various connection responses as I alter the parameters. Please help me correct the parameters/code. I get:

JavaScript

This is the Java client code in a try catch block attempting to connect:

JavaScript

And these are my JNDI tree values in the EAP management console for java:jboss/exported >> JMS >>

JavaScript

Advertisement

Answer

It looks to me like you’re using the wrong InitialContextFactory implementation. Try using org.wildfly.naming.client.WildFlyInitialContextFactory instead of org.jboss.naming.remote.client.InitialContextFactory.

You can find a full JMS client example for JBoss EAP 7.3 here.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement