This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not a MUST to use Java Serialization ?

 
Timothy Toe
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that it is not a MUST to use Java Serialization for bean passivation and activation. The container is allowed to use an equivalent method/technique.

What about serializing a Java object for transferring over a remote call (over a network) ?
eg,
1) object passed in as parameter to a remote method call
2) object passed back as a return object as a result of a remote method call.

Is it the same ? Is it not a must to use Java Serialization too ?


Thanks.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All objects that ever get passed back and forth from the server to the client or between two remote interfaces in the same server are ALWAYS passed by value and MUST be legal types for RMI/IIOP. So the conventional RMI serialization rules apply here. The two synchronization types you mention have nothing in common here and serve completely different purposes.

What happens on the boundary of the server (serialization of travelling objects) is ruled by the spec and what happens within it (serialization of passivated beans) is not and is left open to the vendors.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic