Hi Scot,

JRun allowing the non-serialised object in the ObjectMessage "on the way in
" i.e while publishing is incorrect. According to JMS specs if the object is
not serialised a MessageFormatException should be thrown in the setObject()
call itself.

I guess you will have to serialize the object as wrapping the unserialised
object in another serialised object would also not help.

BTW, Check out FioranoMQ at www.fiorano.com . I have worked with Object
messages
using this one and it has great performance.

Thanks.
+Deepak.


----- Original Message -----
From: "Scot Mcphee" <[EMAIL PROTECTED]>
To: "JDJList" <[EMAIL PROTECTED]>
Cc: "JDJList" <[EMAIL PROTECTED]>
Sent: Thursday, November 07, 2002 2:24 PM
Subject: [jdjlist] JMS ObjectMessage


>
> Is it normal for a JMS implementation to be really picky about what sort
of
> Object will be serialisable in an ObjectMessage?
>
> I've got a real boring plain old data bean which I can easily serialise
and
> transmit via usual methods e.g. RMI. But when I stick the same object into
> an ObjectMessage on *deserialisation* the implementation (JRun 4) throws
> javax.jms.MessageFormatException.
>
> It does this as soon as I call;
>
> Object o = objectmsg.getObject();
>
> It doesn't complain on the way in. It works real dandy with simple Java
> objects like java.util.Date.
>
> The JRun manual only has this to say about the Object Message (all
examples
> are with TextMessages);
>
> ObjectMessage
> Contains a serializable Java object.
> Use one of the JDK Collection classes.
>
> It's not explained what the cryptic reference to the Collections API means
> but wrapping it in an ArrayList doesn't make any difference. Googling it
> didn't seem to turn up anything useful.
>
> I would like to avoid having to XML-ise the object. I will refrain
likewise
> from manually churning the object into a ByteStream because the
BytesMessage
> comments look even worse than the ObjectMessage. If anyone has any
insights
> into the ObjectMessage either generally or specifically to this
> implementation which might help me make it work I would appreciate it.
>
> Otherwise, what's the best JavaObject to XML and back package to use?
What's
> the name of the Sun one?
>
> regs
> scot.
>
> ___________________________________________
> Scot Mcphee -                 Snr Developer
>             -       (mobile) +61-412-957414
> ___________________________________________
> Tigerex     -        http://www.tigerex.net
>             -          (bus) +61-2-82593613
> ___________________________________________
>
>
>
> ____________________________________________________
> To change your JDJList options, please visit:
> http://www.sys-con.com/java/list.cfm
>
> Be respectful! Clean up your posts before replying
> ____________________________________________________
>


____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to