我的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(...
}
...
}
我正在尝试迁移到JBoss EAP 6,但在部署时我收到此错误:
SendNotification \“。目的地缺失
然后我尝试使用以下命令配置 standalone-full.xml
<jms-destinations>
<jms-queue name="MyAppQueueNotification">
<entry name="java:/jms/queue/MyAppQueueNotification"/>
</jms-queue>
...
但没有改变......它出了什么问题?
答案 0 :(得分:2)
我希望该链接有助于:Migration 第3.1.8.4节。
请尝试将@Resource(mappedName="queue/QueueNotification")
更改为@Resource(mappedName="java:/queue/QueueNotification")