[英]JMS migration from JBoss 5.1 GA to EAP 6.4
I have this code on my JBoss 5.1 web application compatible: 我的JBoss 5.1 Web应用程序兼容以下代码:
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(...
}
...
}
I'm trying to migrate to JBoss EAP 6, but on deploy I receive this error: 我正在尝试迁移到JBoss EAP 6,但在部署时会收到此错误:
SendNotification \\".destination is missing SendNotification \\“。destination丢失
Then I tried to configure standalone-full.xml with: 然后,我尝试使用以下命令配置standalone-full.xml :
<jms-destinations>
<jms-queue name="MyAppQueueNotification">
<entry name="java:/jms/queue/MyAppQueueNotification"/>
</jms-queue>
...
But nothing changed... What's wrong with it ? 但是什么都没有改变……这是怎么了?
I hope the link helps: Migration Section 3.1.8.4. 我希望该链接对您有所帮助: 迁移第3.1.8.4节。
Please try to change @Resource(mappedName="queue/QueueNotification")
to @Resource(mappedName="java:/queue/QueueNotification")
请尝试将
@Resource(mappedName="queue/QueueNotification")
更改为@Resource(mappedName="java:/queue/QueueNotification")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.