Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jms serialization

Reply
Thread Tools

jms serialization

 
 
g_asi2
Guest
Posts: n/a
 
      12-10-2006
Hi,

I am new to JMs, and I would like to ask if serialization is performed
always?
I mean that if the components which use the queue are remote, it is
obvious that serialize commited when inserting the queue, and
deserialize commited when dequeuing.
But if the two components aren't remote (even same process), is JMS
"smart enough" not to serialize?

Thanks,
Asi

 
Reply With Quote
 
 
 
 
Wesley Hall
Guest
Posts: n/a
 
      12-10-2006
g_asi2 wrote:
> Hi,
>
> I am new to JMs, and I would like to ask if serialization is performed
> always?
> I mean that if the components which use the queue are remote, it is
> obvious that serialize commited when inserting the queue, and
> deserialize commited when dequeuing.
> But if the two components aren't remote (even same process), is JMS
> "smart enough" not to serialize?
>
> Thanks,
> Asi
>


This will depend on your JMS broker. If you are using JMS where the
broker, the sender and the receiver are all in the same process then I
don't see why the broker should need to serialize the message. However,
many broker will just use standard 'generalised' code to handle messages
which may include serialization. Given that using an 'in process' JMS
broker to send messages is a very rare case (overkill!) then it is
probably unreasonable to expect broker providers to allow for this
specific case.

The only way to know for sure would be to write a test case, provide a
writeObject in your serializable class and print a message to the
console. If the message prints, it is serializing.
 
Reply With Quote
 
 
 
 
EJP
Guest
Posts: n/a
 
      12-10-2006
If I was implementing a JMS provider I would always use serialization
and avoid the 'optimization' so that I could preserve the correct
semantics. If I avoided serialization in the in-memory case, a
subsequent change to one of the (non-)serialized objects at the sender
would be reflected at the receiver, and that's certainly not the
intention of the JMS specification.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
implementing or using jms or running jms without application server ravinder.ggl@gmail.com Java 0 06-26-2007 10:26 AM
how to move from java object serialization to xml serialization? Dimitri Ognibene Java 4 09-02-2006 07:32 AM
Object serialization XML vs java serialization plasticfloor@gmail.com Java 3 06-14-2006 03:45 AM
Serialization Problems and books on serialization? sinleeh@hotmail.com Java 8 01-02-2005 02:40 PM
How to setup JBoss for JMS (not MDB-JMS) ? Thomas Stein Java 0 10-18-2004 09:10 PM



Advertisments