Hello HornetQ!
I am trying to use HornetQ as JMS provider in JBoss 5.1 EAP.
I successfully create a new server following the user guide instruction.
Adding the queues was really fast but now I am blocked with this error :
IllegalStateException: Cannot convert value of type [org.hornetq.jms.client.HornetQXAConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found
Which is thown by Spring.
I retrieve the connection factory using JNDI. I attempted to change the JndiName without success. I always end up with a org.hornetq.jms.client.HornetQXAConnectionFactory isntance, even when using java:ConnectionFactory or /ConnectionFactory.
From what I read in this post http://community.jboss.org/message/620964 I would like to use a HornetQJMSConnectionFactory instead.
Is that a good idea ? I did not changed the hornetq-jms.xml file yet since I do not know how to declare that implementation of the connection factory.
Documentation did not help.
Any idea ?
Thank you in advance,
Olivier
Edit: From what I see in the sources HornetQXAConnectionFactory implements javax.jms.ConnectionFactory...
public class HornetQXAConnectionFactory extends HornetQConnectionFactory implements XAConnectionFactory, XATopicConnectionFactory, XAQueueConnectionFactory, ConnectionFactory, TopicConnectionFactory, QueueConnectionFactory
Am I missing something elsewhere ?
Ok as explained here I had multiple jms api in the classpath.
Changing the maven scope to provided fixed the issue.
In JBoss 5.1 the API is located by the jboss-javaee.jar file from the /lib directory.