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:
A Generic JMS provider with the WebMethods jars in the classpath of that provider. That provider also had the
A Queue with Name, JNDI name (internal) and External JNDI Name cn=XXXXXXXX,ou=xxxx-xxxx,ou=xxxxx,ou=xxx,dc=xxx,dc=xxx
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:
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:
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).
[EDITED] I have misread the question. My answer is misleading, because talking about LDAP authentication, what is not point of question.
You can try configure LDAP authentication in security domain [1] using e.g. LdapLoginModule[2]. And then reference this security domain from messaging subsystem.
I am afraid this has nothing to do with LDAP authentication.
These LDAP attributes, concern the "initial context" which gives a starting point from which the JMS client can resolve the names of the objects in that location of the naming and directory service.
First of all the configuration you are trying to setup has to do with the embedded Messaging Broker which is Apache ActiveMQ Artemis.
If you want to stick with that, you have to check with the corresponding ActiveMQ Artemis documentation if it can support LDAP as a JNDI service provider. By the way, I don't think so.
Thanks for the replies mchoma and pjhavariotis. So, specifically, pjhavariotis, you say "the configuration you are trying to setup has to do with the embedded Messaging Broker which is Apache ActiveMQ Artemis.If you want to stick with that, you have to check with the corresponding ActiveMQ Artemis documentation if it can support LDAP as a JNDI service provider. By the way, I don't think so."
Are you aware of any way to do what I want to do on JBoss? We have some people (internally at my company) who did this in JBoss AS 3.08, but now that we're going to be on JBoss EAP 7, the instructions they gave (using an mbean as seen below) looks out of date:
If you're attempting to integrate your Spring-based JMS application running on JBoss EAP 7 with the Web Methods JMS broker then you shouldn't be doing anything with messaging subsystem built in to EAP 7. You would only configure the messaging subsystem in EAP 7 if you actually wanted to integrate with it, but in this case all the evidence suggests you don't actually want to do that.
Configure your Spring-based application to talk directly to LDAP for its JNDI lookups.
I assume you're not doing #2 already because you want some of the functionality that a container can provide for you here (e.g. connection pooling, simple runtime management, etc.).
All the configuration for #1 can go in your standalone*.xml despite the fact that you're dealing with a RAR (which can be physically deployed or can just be contained within a module just like any other library). The documentation for the RAR (linked above) should have sufficient documentation for you. You should just need to plug in your JNDI properties and I would expect everything to work.
Since your application will be looking up both a JMS connection factory and JMS destination in JNDI it would probably be best to configure an "External Context" pointing to your LDAP server and then use that context for all your application's JNDI lookups.
Thanks - I have a .rar for WebMethods in particular and I can proceed to install that. However, in the documentation from them, I do not see a way to point to LDAP. For example, there is a case study from the field entitled "Integration and Configuration of SofwareAG’s webMethods Broker with JBOSS EAP 6.1". In there, it is gives instructions how to install the resource adapter, but all the properties that are configured therein assume that the property values are not LDAP formatted locations. For example, there is a property
It is not accepted properly. Also, it is not clear to me how to connect the external-context for LDAP with the JMS configurations. Unfortunately, there seems to be no comprehensive example on how to do this the LDAP way...
Thanks again for the effort you put into your response.
Thanks - I have a .rar for WebMethods in particular and I can proceed to install that.
I wasn't suggesting you use the RAR from Web Methods. I was suggesting you use the Generic JMS JCA Resource Adapter for JBoss AS. As the name suggests, this is a generic JMS RAR which can integrate with various providers in various ways. All you need to do is plug in your JNDI properties. As I said, I think it would work with LDAP without any issue.
Also, it is not clear to me how to connect the external-context for LDAP with the JMS configurations. Unfortunately, there seems to be no comprehensive example on how to do this the LDAP way...
If you take a look at the documentation I linked for the external context you can see a simple example using LDAP. Using the external context you can essentially pull in everything from the LDAP JNDI and just look it up locally from your applications using the namespace defined in the "name" parameter. It should be really straight forward. People do integrations like this with other JMS providers all the time.
OK, thanks - it sounds promising - I'll give it a try. The reason that I was communicating that I would try the webMethods adapter is because if this statement in the documentation for theGeneric JMS JCA Resource Adapter for JBoss AS:
"To be clear, the Generic JMS JCA Resource Adapter for JBoss AS should only be used if the JMS provider with which you are integrating does not have a JCA Resource Adapter of its own. Most enterprise JMS providers have their own JCA RA, but for whatever reason there are still a few who are lacking this essential integration component."
Since WebMethods does have one, I was thinking I should use that, but I can try this one first.