Thank you for your answer Ashwin.

Actualy I found from where the error comes :

The JNDI lookup to Weblogic return a weblogic.jms.common.DestinationImpl
instance that is the Weblogic generic implementation for Queue and Topic.

In the org.apache.activemq.command.ActiveMQDestination class the transform()
method can obtain both a queue name and a topic name and therefore doesn't
know in witch one to cast.

The Weblogic impl has two methods isQueue() and isTopic() for that.

But now I have no idea for any workaround.
Any help would be appreciated...


See the ActiveMQDestination class code below

    public static ActiveMQDestination transform(Destination dest) throws
JMSException {
        if (dest == null) {
            return null;
        }
        if (dest instanceof ActiveMQDestination) {
            return (ActiveMQDestination)dest;
        }
        
        if (dest instanceof Queue && dest instanceof Topic) {
            *String queueName = ((Queue) dest).getQueueName();
            String topicName = ((Topic) dest).getTopicName();* 
           if (queueName != null && topicName == null) {
                return new ActiveMQQueue(queueName);
            } else if (queueName == null && topicName != null) {
                return new ActiveMQTopic(topicName);
            }
            throw new JMSException("Could no disambiguate on
queue|Topic-name totransform pollymorphic destination into a ActiveMQ
destination: " + dest);
        }
        if (dest instanceof TemporaryQueue) {
            return new
ActiveMQTempQueue(((TemporaryQueue)dest).getQueueName());
        }
        if (dest instanceof TemporaryTopic) {
            return new
ActiveMQTempTopic(((TemporaryTopic)dest).getTopicName());
        }
        if (dest instanceof Queue) {
            return new ActiveMQQueue(((Queue)dest).getQueueName());
        }
        if (dest instanceof Topic) {
            return new ActiveMQTopic(((Topic)dest).getTopicName());
        }
        throw new JMSException("Could not transform the destination into a
ActiveMQ destination: " + dest);
    }


--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-ActiveMQ-to-Weblogic-route-tp4578300p4582476.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to