Troubles configuring EAP 7 to work with an external A-MQ 6

Latest response

Hi,

I'm trying to migrate a J2EE application from EAP 6 to 7.
The application is using an external A-MQ 6 server as the JMS provider.
I tried to configure EAP 7 with http://activemq.apache.org/resource-adapter.html, as suggested in Red_Hat_JBoss_Enterprise_Application_Platform-7.0-Configuring_Messaging-en-US.pdf, "DEPLOYING AN A-MQ RESOURCE ADAPTER", but it's complaining about the ConnectionFactory:

Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.apache.activemq.ra.ActiveMQConnectionFactory] to required type [javax.jms.ConnectionFactory] for property
'connectionFactory': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:302)
at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:576)

The problem is that "ActiveMQConnectionFactory.class instanceof ConnectionFactory" returns false, and it looks like that happens because it's loading the JMS 2 version of the class ConnectionFactory.

I tried to exclude the javax.jms API in jboss-deployment-structure.xml, but it's still not working.

Any help will be very much appreciated!

Cheers

Responses

Could you attach your configuration for both EAP 6 and 7? From where are you making call to AMQ 6 broker?

EAP 7 -> https://pastebin.com/paiHMfaM EAP6 -> https://pastebin.com/U1Jn6cTf

My application is using camel 2.15.1 over spring 4.2.5 (as given by JBoss BOM) to connect. Here is the definition of the bean which is causing the deployment to fail:

<jee:jndi-lookup jndi-name="activemq/ConnectionFactory" id="pooledJmsConnectionFactory" resource-ref="true"
                 expected-type="javax.jms.ConnectionFactory"/>

I think I solved. I hadn't configured the messaging subsystem:

https://developer.jboss.org/message/960798#960798

Glad to hear it.