Hello,

I have a following interface:

public interface Test extends Message {

public void testMessage();

public void getString();

}

If I get a Message I want to cast the Message in Test:

public void onMessage(Message message) {
   Test test = (Test) message;

}

But I get the following Exception:

java.lang.ClassCastException:
org.apache.activemq.command.ActiveMQTextMessage cannot be cast to Test.

Can you help me further please? I don't know, what the problem is.
-- 
View this message in context: 
http://old.nabble.com/ClassCastException-tp29054743p29054743.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Reply via email to