JMS从JBoss 5.1 GA到EAP 6.4的迁移
我的JBoss 5.1 web应用程序兼容以下代码:JMS从JBoss 5.1 GA到EAP 6.4的迁移,jboss,jms,java-ee-7,jboss-eap-6,Jboss,Jms,Java Ee 7,Jboss Eap 6,我的JBoss 5.1 web应用程序兼容以下代码: public class SendNotification { @Resource(mappedName="queue/QueueNotification") private Queue destination; @Resource(mappedName="ConnectionFactory") private QueueConnectionFactory connectionFactory; pu
public class SendNotification {
@Resource(mappedName="queue/QueueNotification")
private Queue destination;
@Resource(mappedName="ConnectionFactory")
private QueueConnectionFactory connectionFactory;
public void sendMessageToDestination(Mymessage message) {
connection = connectionFactory.createConnection();
sessione = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = sessione.createProducer(destination);
ObjectMessage message = sessione.createObjectMessage();
message.setObject(messaggio);
..
producer.send(...
}
...
}
我正在尝试迁移到JBoss EAP 6,但在部署时收到以下错误:
SendNotification\”。缺少目标
然后,我尝试使用以下配置standalone-full.xml:
...
但是什么都没变……有什么问题吗?我希望这个链接有帮助:
第3.1.8.4节
请尝试将@Resource(mappedName=“queue/QueueNotification”)
更改为@Resource(mappedName=“java:/queue/QueueNotification”)
我希望该链接有助于:
第3.1.8.4节
请尝试将@Resource(mappedName=“queue/QueueNotification”)
更改为@Resource(mappedName=“java:/queue/QueueNotification”)
尝试使用jndi“java:jboss/exported/queue/QueueNotification”创建队列,并在使用jndi创建队列时使用jndi“/queue/QueueNotification”java:jboss/exported/queue/QueueNotification“并在查找时使用jndi”/queue/QueueNotification。您是否尝试过?它可能会提示您出了什么问题。您是否尝试过?它可能会提示您出了什么问题。
<jms-destinations>
<jms-queue name="MyAppQueueNotification">
<entry name="java:/jms/queue/MyAppQueueNotification"/>
</jms-queue>
...