Wilfly10 apache artemis-JMS实现

Wilfly10 apache artemis-JMS实现,jms,activemq,wildfly-10,Jms,Activemq,Wildfly 10,在JBoss5.x中,JMS模型-队列(点对点)曾经实现如下(MDB类和ejb jar.xml) MDB ejb-jar.xml <?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemaLocation

在JBoss5.x中,JMS模型-队列(点对点)曾经实现如下(MDB类和ejb jar.xml)

MDB

ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<display-name>MDB</display-name>
<enterprise-beans>
<message-driven>
 <display-name>MDB1</display-name>
 <ejb-name>MDB1</ejb-name>
 <ejb-class>receiver.WildFlyJmsQueueReceiveLocal</ejb-class>
 <transaction-type>Container</transaction-type>
 <activation-config>
    <activation-config-property>
        <activation-config-property-name>destinationType</activation-config-property-name>
        <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
        <activation-config-property-name>destination</activation-config-property-name>
        <activation-config-property-value>jms/queue/TestQ</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>maxSession</activation-config-property-name>
   <activation-config-property-value>2</activation-config-property-value>
    </activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</ejb-jar>

MDB
MDB1
MDB1
receiver.WildFlyJmsQueueReceiveLocal
容器
目的型
javax.jms.Queue
目的地
jms/queue/TestQ
maxSession
2.
现在我正在从JBoss5.x迁移到wildfly10。在wildfly 10中,JMS特性已使用“ApacheActiveMQ Artemis”实现。 所以在wildfly 10中,首先我配置了队列“jms/queue/TestQ”,并尝试部署相同的代码(在jboss 5.x中使用过),它成功地运行了。我认为我必须创建'ActiveMQConnectionFactory'对象并做进一步的工作,但事实并非如此。我在JBoss5.x中使用的JMS API在wildfly10中运行良好

JMS发送方和接收方部署在同一个wildfly实例上。我是否正确实现了JMS队列功能?这是wildfly10的正确方式吗。如果没有,请告诉我链接/文档

我的名字是
我在Jboss 5.x(用于JMS队列实现)中使用的Java代码将在Wildfly-10中工作,无需任何更改。

对于Jboss 5.x,请转到JMS链接:


感谢您的回复,我已经在JBoos5.x中实现了JMS特性。我在JBoss5.x中使用的代码也在wildfly-10中工作。我是否在wildfly-10中正确实现了JMS队列功能?这是wildfly10的正确方式吗。如果没有,请告诉我链接/文档。@Kamal Vijay。。。实际上,我还没有在wildfly-10上工作过。Wildfly-10专家可以指导您实现JMS。请回复…同样的代码也可以。你是如何发送信息的?当您的发件人发送邮件时,是否将其添加到队列中?您可以在
管理控制台上查看它。检查队列中添加的
消息的天气计数是否增加。如果没有,请与您的发件人联系。
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<display-name>MDB</display-name>
<enterprise-beans>
<message-driven>
 <display-name>MDB1</display-name>
 <ejb-name>MDB1</ejb-name>
 <ejb-class>receiver.WildFlyJmsQueueReceiveLocal</ejb-class>
 <transaction-type>Container</transaction-type>
 <activation-config>
    <activation-config-property>
        <activation-config-property-name>destinationType</activation-config-property-name>
        <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
        <activation-config-property-name>destination</activation-config-property-name>
        <activation-config-property-value>jms/queue/TestQ</activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>maxSession</activation-config-property-name>
   <activation-config-property-value>2</activation-config-property-value>
    </activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
</ejb-jar>