users@glassfish.java.net

Re: MessageSender.send throws UnsupportedOperationException

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Mon, 24 Dec 2007 16:06:21 +0530

glassfish_at_javadesktop.org wrote:
> JMS implementation in Glassfish throws
> UnsupportedOperationException
when using method Message.send(javax.jms.Destination destination,
javax.jms.Message message). If method Message.send(javax.jms.Message
message) is used, it is OK. Unfortunately I use thirdparty software
that use first method (with Destination as a parameter) so I cannot
change it. How can I solve this problem?

I am assuming you are referring to MessageProducer/QueueSender.send.
The MessageProducer.send(Destination, Message) would throw an
unsupported operation exception if the MessageProducer was created
with a Destination. Please see
http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html#send(javax.jms.Destination,%20javax.jms.Message)

How is the MessageProducer created? Would you be able to change that?

Thanks
--Siva.

> Thank you.
> [Message sent by forum member 'hazurek' (hazurek)]