【问题标题】:How do I replace ActiveMQ Artemis with a standalone ActiveMQ in Wildfly 10?如何在 Wildfly 10 中用独立的 ActiveMQ 替换 ActiveMQ Artemis?
【发布时间】:2017-03-13 15:37: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 中删除了子系统&lt;subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"&gt; 和扩展&lt;extension module="org.wildfly.extension.messaging-activemq"/&gt;

当我现在尝试部署我的应用程序时,我收到一条错误消息:

No message listener of type javax.jms.MessageListener found in resource adapter activemq

我错过了什么?

【问题讨论】:

    标签: jboss activemq wildfly wildfly-10


    【解决方案1】:

    我还没有以这种方式使用过 artemis,但是将 artemis 1.5.3 与 spring 4.x 集成在一起。这是我的artemis配置: 两个节点正在使用 udp 广播进行通信。

    您可以查看项目:https://github.com/mtorak/disttrans

    干杯

    【讨论】:

      猜你喜欢
      • 2016-11-18
      • 2019-11-14
      • 1970-01-01
      • 2016-06-23
      • 2019-04-29
      • 2016-12-10
      • 2017-09-21
      • 2017-04-14
      • 1970-01-01
      相关资源
      最近更新 更多