JBoss EAP 7 JMS connecting to LDAP

Posted on

I'm trying to port a Spring 4 JEE app over to JBoss EAP 7 from WebSphere 7 and have gotten much of it working. Now I'm working on JMS. The JMS queue is hosted by Web Methods broker and we look that up from an LDAP connection. In WebSphere, to get this to work, we had configured:

  1. A Generic JMS provider with the WebMethods jars in the classpath of that provider. That provider also had the External initial context factory set to com.sun.jndi.ldap.LdapCtxFactory and the External provider URL to ldap://ldap-xxx-xxx.xxx:xxx, having Custom Properties java.naming.security.principal and java.naming.security.credentials
  2. A Queue with Name, JNDI name (internal) and External JNDI Name cn=XXXXXXXX,ou=xxxx-xxxx,ou=xxxxx,ou=xxx,dc=xxx,dc=xxx
  3. A QueueConnectionFactory with Name, JNDI name (internal) and External JNDI Name cn=XXXXXXXX,ou=xxxx-xxxx,ou=xxxxx,ou=xxx,dc=xxx,dc=xxx

Note, there is not any RAR file installed there and if possible I would prefer not to do that - I'd rather have all the configurations in the standalone*.xml file instead.

Since this is a Spring app, I have a spring context file with jms configurations in there that get wired into my spring beans (note - I had to take out the beginning angle bracket in the following XML lines for this portion to be included in the post):

jee:jndi-lookup id="jmsProducerConnectionFactory" jndi-name="java:comp/env/XyzFactory" />

jee:jndi-lookup id="sendDestination" jndi-name="java:comp/env/AbcDestination" />

bean id="jmsQueueTemplate" class="org.springframework.jms.core.JmsTemplate">
property name="connectionFactory" ref="jmsProducerConnectionFactory" />
property name="destinationResolver" ref="jmsDestResolver" />
property name="defaultDestination" ref="sendDestination" />
property name="receiveTimeout" value="60000" />
bean id="jmsDestResolver" class="org.springframework.jms.support.destination.DynamicDestinationResolver" />

I'm trying to set up the similar thing as this in JBoss EAP 7. So far I have datasources, namespace bindings and many other things working. Now as I start with the JMS, I'm having problems. I've read the docs on this at:


(and many other suggestions). So far, I have this set up in my standalone-full.xml

    <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
        <server name="default">
            <security-setting name="#">
                <role name="guest" delete-non-durable-queue="true" create-non-durable-queue="true" consume="true" send="true"/>
            <address-setting name="#" message-counter-history-day-limit="10" page-size-bytes="2097152" max-size-bytes="10485760" expiry-address="jms.queue.ExpiryQueue" dead-letter-address="jms.queue.DLQ"/>
            <http-connector name="http-connector" endpoint="http-acceptor" socket-binding="http"/>
            <http-connector name="http-connector-throughput" endpoint="http-acceptor-throughput" socket-binding="http">
                <param name="batch-delay" value="50"/>
            <in-vm-connector name="in-vm" server-id="0"/>
            <http-acceptor name="http-acceptor" http-listener="default"/>
            <http-acceptor name="http-acceptor-throughput" http-listener="default">
                <param name="batch-delay" value="50"/>
                <param name="direct-deliver" value="false"/>
            <in-vm-acceptor name="in-vm" server-id="0"/>
            <jms-queue name="AbcDestination" entries="java:/jms/AbcDestination"/>
            <connection-factory name="XyzFactory" entries="java:/XyzFactory" connectors="http-connector"/>

Unfortunately I've not seen any examples where the jms is connecting to LDAP. I don't know where to put the LDAP Url (really all the JNDI properties including the credentials).

Any help would be appreciated.