Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

serialization  RSS feed

 
Kshama Mahendra Chopra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

cld anyone please tell me what exactly serialization is,

and what is the difference if an object in RMI calls is not serialized?

regards,
Kshama
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15861
81
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google: serialization tutorial

and what is the difference if an object in RMI calls is not serialized?

I don't understand what you mean here.
 
Kshama Mahendra Chopra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanx for your reply.

I have studied somewhere that to pass various objects back and forth

between the client and server in RMI calls they need to be serialized.

My query is what if they are not serialized?

I hope this time i have made myself clear.
 
Martin Simons
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read/do his tutorial link, then rethink your question about RMI. The
answer should present itself to you at that point.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serializing in Java has a specific meaning used with ObjectOutputStream and such.

As a generic term, serialize means convert an in-memory structure into another format that can be sent between software components, usually into bytes that can be sent one at a time - serially - over a wire. RMI certainly counts as an example of that. Other examples include converting objects to XML or using a standard base64 encoder or making up your own proprietary algorithms. You'll also see the words marshall and unmarshall used for roughly the same thing.

Confusing enough?
 
Kshama Chopra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Stan.

Your reply has almost satisfied my query.

Still i am confused as to what if i do not serialize the objects?

Is there no other options?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will not be able to use RMI to transfer objects that are not serializable in the Java sense of the word. It's a precondition of using RMI.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!