【问题标题】:JMS migration from JBoss 5.1 GA to EAP 6.4JMS 从 JBoss 5.1 GA 迁移到 EAP 6.4
【发布时间】:2018-03-27 18:33:03
【问题描述】:

我的 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 \".destination 丢失

然后我尝试配置 standalone-full.xml

<jms-destinations>                  
    <jms-queue name="MyAppQueueNotification">
        <entry name="java:/jms/queue/MyAppQueueNotification"/>                        
    </jms-queue>                    
    ...

但是什么都没有改变...有什么问题?

【问题讨论】:

标签: jboss jms java-ee-7 jboss-eap-6


【解决方案1】:

希望链接对您有所帮助:Migration 第 3.1.8.4 节。

请尝试将@Resource(mappedName="queue/QueueNotification")更改为@Resource(mappedName="java:/queue/QueueNotification")

【讨论】:

  • 尝试使用 jndi "java:jboss/exported/queue/QueueNotification" 创建队列并在查找时使用 jndi "/queue/QueueNotification"
猜你喜欢
  • 2018-09-16
  • 2021-08-26
  • 2017-06-24
  • 2023-03-08
  • 1970-01-01
  • 1970-01-01
  • 2021-02-22
  • 2019-05-10
  • 1970-01-01
相关资源
最近更新 更多