[英]How do I replace ActiveMQ Artemis with a standalone ActiveMQ in Wildfly 10?
我想在我的Wildfly 10服务器上使用独立的ActiveMQ而不是内置的ActiveMQ Artemis,但我无法让它工作。 我已经部署了ActiveMQ资源适配器“activemq-rar-5.14.1.rar”,在standalone.xml
我创建了一个resource-adapter
:
<subsystem xmlns="urn:jboss:domain:ejb3:4.0">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
<stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>
<singleton default-access-timeout="5000"/>
</session-bean>
<mdb>
<resource-adapter-ref resource-adapter-name="activemq"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
...
<resource-adapter id="activemq">
<archive>
activemq-rar-5.14.1.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<config-property name="ServerUrl">
tcp://localhost:61616
</config-property>
<config-property name="UserName">
defaultUser
</config-property>
<config-property name="UseInboundSession">
false
</config-property>
<config-property name="Password">
defaultPassword
</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/ConnectionFactory" enabled="true" pool-name="ConnectionFactory">
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>false</prefill>
<is-same-rm-override>false</is-same-rm-override>
</xa-pool>
<recovery>
<recover-credential>
<user-name>defaultUser</user-name>
<password>defaultPassword</password>
</recover-credential>
</recovery>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/jms/queue/MyTestQueue" use-java-context="true" pool-name="MyTestQueue">
<config-property name="PhysicalName">
MyTestQueue
</config-property>
</admin-object>
<admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/jms/queue/MySecondTestQueue" use-java-context="true" pool-name="MySecondTestQUeue">
<config-property name="PhysicalName">
MySecondTestQueue
</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
我还从standalone.xml中删除了子系统<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
和扩展名<extension module="org.wildfly.extension.messaging-activemq"/>
。
当我现在尝试部署我的应用程序时,我收到一条错误消息:
No message listener of type javax.jms.MessageListener found in resource adapter activemq
我错过了什么?
我还没有以这种方式使用artemis,但是将artemis 1.5.3与spring 4.x集成在一起。 这是我的artemis配置:两个节点正在与udp广播通信。
您可以检查项目: https : //github.com/mtorak/disttrans
干杯
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.