• Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization Problem

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am not understanding Serialization.When we say Serialization of objects,we mean writing the object in bytes format in streams.But in case of RMI ,we do not write the serializable object into streams.Is it handled by JVM
internally or there is something else.Please express your views.

I also want to know that whenever we serialize an object,every time its our responsibility to write the object into stream or it is handled by jvm or some other software usin this serializable object.

with regards,
ajse
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An application programmer can explicitly serialize an object to a file, for example. As that programmer, you would write the statement:

RMI uses serialization as an implementation detail, to pass arguments and return results remotely. As the application programmer, you don't explicitly write that code -- it is buried in the RMI stub. Instead you simply call the remote method:

So the point here is that it's all about levels of abstraction. If you are not implementing the level where serialization exists, you don't see it. This has nothing to do with serialization per se, it's just a fundamental aspect of software design.
[ December 16, 2005: Message edited by: Jeff Albrechtsen ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!