Search code examples
jbossjmsjava-ee-7jboss-eap-6

JMS migration from JBoss 5.1 GA to EAP 6.4


I have this code on my JBoss 5.1 web application compatible:

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:

SendNotification \".destination is missing

Then I tried to configure standalone-full.xml with:

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

But nothing changed... What's wrong with it ?


Solution

  • I hope the link helps: Migration Section 3.1.8.4.

    Please try to change @Resource(mappedName="queue/QueueNotification") to @Resource(mappedName="java:/queue/QueueNotification")