I'm using JBoss AS 7.1.0.CR1 and am having issues getting my resource adapter for Websphere MQ (wmq.jmsra.rar) working. My server starts fine and I see in the output that my admin object and connection factory are being bound:

I'm also tried using Spring MDB, referencing the connection factory jndi as well as the admin object, but either way, I am not able to connect to the host and get the message off the queue. I feel like there's some disconnect between the admin object and the connection factory. Maybe I'm off base, but given that you can add multiple connection factories and the admin object is defined as a sibling to the connectionFactories, how does it know which to use? (I though the Spring solution would solve my issue as it references both)

excerpt from my standalone-full.xml (some names have been changed to protect the innocent)

Caused by: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager '' with connection mode 'Client' and host name 'localhost(1414)'. Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.

So again, it appears that the admin object which I'm trying to reference in my MessageListener class via java:jboss/jms/NOTIFICATION.DATAGRAM isn't getting bound to my CF.

Thank you Jesper. I ran the rar-info tool and my configuration looks consistent with the sample that was generated. There are a lot more config properites in the sample that what I had (shown in an above thread) and I assume I only need to specify properties that are essential for me to override and connect and typically when connecting from Websphere and other examples I've seen, the ones that I've defined are all that should be needed (host, channel, port, queue manager, queue and transport type).

Can you please clarify how JBoss knows which connection definition to bind the Message Listener to? I really feel like that is my issue. I maybe missing something in the MessageListener class. Examples I've seen have the following annotation (which I'm also trying to use):

When my application starts, the error displayed says to me it doesn't know how to bind to the connection definition because all of the values it is looking for are empty . So therefore it's not binding to what I have defined in the standalone.xml

Caused by: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager '' with connection mode 'Client' and host name 'localhost(1414)'. Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for moreinformation.

A bit hackish, but this is actually the best solution I've found so far. I'm starting to think that there isn't a "clean" solution to this problem due how the wmq.jmsra.rar's ActivationSpecImpl works (must supply hostName, port etc, no 'connectionFactoryJndiName' or similar property) and the fact that a configureable ActivationSpec doesn't seem to be part of the EJB3 spec.

EDIT: Come to think of it, there might be some some issues with the licence of the wmq.jmsra.rar-adapter for the above solution, anyone looking to do something like this should check that first.

The issue really boils down to that the ActivationSpec needs information from the ConnectionFactory that it hooks up to in the end; IBM can answer why an AdminObject is used in the middle. This "problem" can't really be solved unless the JCA container does some nasty hacks.

So two solutions:

1) Add configuration for all the needed properties on the ActivationSpec instance that are needed to make the connection

2) Contact IBM and have them enhance the resource adapter using the following tricks internally in the implementation

Have the ManagedConnectionFactory's implement ResourceAdapterAssociation

In the setResourceAdapter() method register the ManagedConnectionFactory on the ResourceAdapter instance

Use property on ActivationSpec to uniquely identify the ManagedConnectionFactory

Once ActivationSpec.validate() is called by the container, copy over missing properties through the ResourceAdapter instance from the correct ManagedConnectionFactory instance

I'm making a lot of assumptions since this is vendor specific code, so only access to the source code can give the real answer.

At least I hope the above gives an insight to why you need to specify all the properties on the ActivationSpec...

A follow-up, before people starts complaining about the AdminObject step, an AdminObject can also implement ResourceAdapterAssocation, so the same trick can be used. The only difference is that the copy part needs to be done once the identify property is set.

2. In Jboss 6 it was possible to configure MDBs with annotations, using JNDI admin Objects (mbeans) in *-ds.xml file. Additionally, to avoid hardcoded server config parameters, it was possible to use "AspectDomain" option, to inject necessary properties into MDB using Interceptors. At the moment I did not find any information about how to configure such an "AspectDomains" under JBOSS 7/7.1

I similiarly noticed that I couldn't find @AspectDomain in the class path or any of the AS 7 jars. Is this functionality no longer available or is it done by some other mechanism in AS7?

I similiarly noticed that I couldn't find @AspectDomain in the class path or any of the AS 7 jars. Is this functionality no longer available or is it done by some other mechanism in AS7?

@AspectDomain and AOP are no longer available in AS7.

Paul DuBon wrote:

2. In Jboss 6 it was possible to configure MDBs with annotations, using JNDI admin Objects (mbeans) in *-ds.xml file. Additionally, to avoid hardcoded server config parameters, it was possible to use "AspectDomain" option, to inject necessary properties into MDB using Interceptors.

2. In Jboss 6 it was possible to configure MDBs with annotations, using JNDI admin Objects (mbeans) in *-ds.xml file. Additionally, to avoid hardcoded server config parameters, it was possible to use "AspectDomain" option, to inject necessary properties into MDB using Interceptors.

This is text I was referencing from the other thread. I am moving from Websphere to JBoss, never having used any previous version of JBoss, so I personally haven't done this before, but have been researching different mechanisms for configuring the MDB with environment specific properties. However I had also seen an example of this in the following thread and based on the responses, I assume it worked: