File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Not a MUST to use Java Serialization ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Not a MUST to use Java Serialization ?" Watch "Not a MUST to use Java Serialization ?" New topic

Not a MUST to use Java Serialization ?

Timothy Toe
Ranch Hand

Joined: Oct 19, 2002
Posts: 156
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) ?
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 ?

Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
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.

[Blog] [Blogroll] [My Reviews] My Linked In
I agree. Here's the link:
subject: Not a MUST to use Java Serialization ?
jQuery in Action, 3rd edition