Hello,
This is my configuration (standalone.xml - version jboss 7.1.3):
I use a inVmConnectionFactory for local client only.
<subsystem xmlns="urn:jboss:domain:messaging:1.0">
<connectors>
<in-vm-connector name="in-vm" server-id="0"/>
</connectors>
<jms-connection-factories>
<connection-factory name="InVmConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:jboss/connectionFactory/jms"/>
</entries>
</connection-factory>
</jms-connection-factories>
</subsystem>
This is my Java implementation :
InitialContext context = new InitialContext();
ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("java:jboss/connectionFactory/jms");
But I have a problem when I create a connection :
connectionFactory.createConnection() throw an Exception :
javax.jms.JMSException: Failed to create session factory ==> Caused by: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]
Have you got an idea ?
Thanks.
Hello,
Finally I have resolved the problem.
The messaging version was incorrect.
So, I replaced
urn:jboss:domain:messaging:1.0
By
urn:jboss:domain:messaging:1.2.
And it work :-)