I have a spring-bean of connectionFactory to hornetQ:
<bean name="connectionFactory" class="org.hornetq.jms.client.HornetQConnectionFactory" >
<constructor-arg value="false" />
<constructor-arg ref="transportConfiguration" />
</bean>
and, this bean are using it:
<bean name="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="connectionFactory"></property>
</bean>
All fails with that exception when ‘jmsTemlpate’ bean is starting:
Failed to convert property value of type
‘org.hornetq.jms.client.HornetQConnectionFactory’ to required type
‘javax.jms.ConnectionFactory’
I.e. jmsTemplate requires connectionFactory to be a javax.jms.ConnectionFactory, but it is not.
The question, how and where download the right implementation of ‘HornetQConnectionFactory’ to meet the requirements.
I use this deps in my pom.xml:
<hornetq.version>2.2.13.Final</hornetq.version>
...
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
<version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
<version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-spring-integration</artifactId>
<version>${hornetq.version}</version>
</dependency>
The best way to do this is to use HornetQJMSClient.createConnectionFactory methods
You were using the implementation directly and that’s subjected to change.
The HornetQJMSClient is part of the API and hence the contract is better kept between releases.
You should convert your example to use HornetQJMSClient…
Regarding the blog you found this, perhaps you should point to this question / answer as the blog is using the internal implementation and not the public API.