aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JBoss Messaging - Sending Object Messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JBoss Messaging - Sending Object Messages" Watch "JBoss Messaging - Sending Object Messages" New topic
Author

JBoss Messaging - Sending Object Messages

Raja Gullapalli
Greenhorn

Joined: Jun 10, 2009
Posts: 15
Hi,

I'm trying to send Object Messages to a JMS Queue. The Object is serializable, and able to pass it to the queue without any error.
On the Consumer side, when I try to type cast it back to the desired object. It fails with the below error:

2009-06-10 10:49:17,515 ERROR [org.jboss.jms.client.container.ClientConsumer] (Thread-30) RuntimeException was thrown from onMessage, 20392446480891904 will be redelivered
java.lang.ClassCastException: org.jboss.jms.message.ObjectMessageProxy
at com.tsswireless.application.dispatch.wpi.dds.DDSWirelessProvider.formatMessageToDDS(DDSWirelessProvider.java:96)
at com.tsswireless.application.dispatch.jms.DispatchQueueListener.onMessage(DispatchQueueListener.java:23)
at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:229)
at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:1043)
at org.jboss.messaging.util.OrderedExecutorFactory$ChildExecutor.run(OrderedExecutorFactory.java:120)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)



I've tried googling around, and everyone suggest to set the Payload type to "SYS.AQ$_JMS_OBJECT_MESSAGE", but could not find where to set it.

Thanks,
Raja
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JBoss Messaging - Sending Object Messages