How to specify several pooled-connection-factory ?
vmath Sep 22, 2011 12:27 PMI try to specify two "pooled-connection-factory" in the messaging subsystem of my standalone-preview.xml configuration file as follow:
<jms-connection-factories>
<connection-factory name="InVmConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
</connection-factory>
<connection-factory name="RemoteConnectionFactory">
<connectors>
<connector-ref connector-name="netty"/>
</connectors>
<entries>
<entry name="RemoteConnectionFactory"/>
</entries>
</connection-factory>
<pooled-connection-factory name="hornetq-ra">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
</entries>
<transaction mode="xa"/>
</pooled-connection-factory>
<pooled-connection-factory name="hornetq-ra-nonxa">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/JmsNonXA"/>
</entries>
<transaction mode="local"/>
</pooled-connection-factory>
</jms-connection-factories>
This leads to
17:32:20,101 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.messaging.pooled-connection-factory.hornetq-ra: org.jboss.msc.service.StartException in service jboss.messaging.pooled-connection-factory.hornetq-ra: failed to create resource adapter
at org.jboss.as.messaging.jms.PooledConnectionFactoryService.start(PooledConnectionFactoryService.java:174)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.raactivator is already registered
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154)
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:226)
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560)
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201)
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2194)
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307)
at org.jboss.as.messaging.jms.PooledConnectionFactoryService.createService(PooledConnectionFactoryService.java:232)
at org.jboss.as.messaging.jms.PooledConnectionFactoryService.start(PooledConnectionFactoryService.java:172)
... 5 more
Specifying several pooled connection factories is not prevented by the schema and actually it should be a common need to be able to do so. Any idea on how to achieve this ?
(JBoss 7.0.1.Final, Windows 7, JDK 1.6.0_25 (oracle))
sincerly
Vincent