activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pepgrifell <pepgrif...@yahoo.es>
Subject error "This producer can only send messages to..." in JBoss6 with embedded ActiveMQ4.1.1
Date Mon, 14 May 2012 14:54:52 GMT
hi,

We are migrating from JBoss4.2.3 to JBoss6.1.  We have ActiveMQ integrated
in JBoss 4 and it works ok. 
Following this link:  http://activemq.apache.org/outbound-communication.html
http://activemq.apache.org/outbound-communication.html  I have migrated to
JBoss 6.  The application is deployed correctly but when I try to send a
message to a queue I get this error:

Caused by: java.lang.UnsupportedOperationException: This producer can only
send messages to: HomeTAOEventsQueue
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:459)
[:4.1.1]
	at
org.apache.activemq.ActiveMQQueueSender.send(ActiveMQQueueSender.java:139)
[:4.1.1]

This error is thrown in the class ActiveMQMessageProducer. I have debbuged
the application and when the method ActiveMQMessageProducer.send is called,
it does this comparation (can't find how to tag code):


            public void send(Destination destination, Message message, int
deliveryMode, int priority, long timeToLive)
            throws JMSException {
        checkClosed();
        if (destination == null) {
            if( info.getDestination() == null ) {
                throw new UnsupportedOperationException("A destination must
be specified.");
            }
            throw new InvalidDestinationException("Don't understand null
destinations");
        }

        ActiveMQDestination dest; 
        if( destination == info.getDestination() ) {
            dest = (ActiveMQDestination) destination;
        } else  if ( info.getDestination() == null ) {
            dest = ActiveMQDestination.transform(destination);
        } else {
            throw new UnsupportedOperationException("This producer can only
send messages to: " + this.info.getDestination().getPhysicalName());
        }
        if (dest == null) {
            throw new JMSException("No destination specified");
        }
        
        this.session.send(this, dest, message, deliveryMode, priority,
timeToLive);
        stats.onMessage();            
    }


The code 'destination == info.getDestination()'  returns false !

'info.getDestination()' returns an ActiveMQQueue object instantiaded in
constructor and its physicalName is 'HomeTAOEventsQueue'.  

'destination' is a ActiveMQQueue passed as a parameter when calling the
'sender' method. Its physicalName is 'HomeTAOEventsQueue'.  

In the line I posted above, the comparision returns "false" but I don't know
why ... 

Any help ?
Thanks !

pd: I can post configuration files if needed.

--
View this message in context: http://activemq.2283324.n4.nabble.com/error-This-producer-can-only-send-messages-to-in-JBoss6-with-embedded-ActiveMQ4-1-1-tp4632351.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message