Total members 11894 |It is currently Mon Nov 25, 2024 11:59 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





I need a clear clarification on Externalization and Serialization.

What i heard from different forums is the following:-
->Externalization is customization of Serialization which provides two methods
readExternal() and writeExternal().
->If we want to forbid some variables in participating in serialization we
need to implement Externalizable and ovverride those two methods and serialize
only the required variables.

The statement marked in red can be achieved by simply marking the variables as
transient(which doesnot allow variables to participate in Serialization).

Please help me in understanding these two concepts.

Also,
1) Send me some links that clearily expalins these two concepts.
2) What are the actual differences between these two words.
3) Which provides good performance.




Author:
Proficient
User avatar Posts: 280
Have thanks: 1 time

The follwing answer i took from a site but unfortunately they dint give any more
examples.

Sterilization is a process of converting state of an object to stream of bytes
that can be sent over network or can be stored in a file or in database to be
reconstructed into Object Later when required. Remember EJB spec, all EJB
(Session or Entity) implements Serializable interface indirectly, in case of
Statefull session bean it can be Passivated or Activated (Persisted by writing
it to file system or Database this is done by container).

Externalization is same as Sterilization except that WriteObject() and
ReadObject() method are called by JVM during sterilization an desterilization of
object. One thing you can do with Externalization is that you can store extra
information into object like STATIC variables and transient variables or you can
add more information if you have any business need. One good example is
compressing and uncompressing of data to send it through network or converting
one format to other like a BMP image to JPEG or GIF format.

_________________
Please recommend my post if you found it helpful


Author:
Proficient
User avatar Posts: 228
Have thanks: 0 time

You just ping the host name. you get the as same as below.

Pinging Yahoo.com [216.109.112.135] with 32 bytes .


There's a good example of that done in Java here:

Code:
http://www.rgagnon.com/javadetails/java-0093.html


_________________
Please recommend my post if you found it helpful


Author:
Proficient
User avatar Posts: 228
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : Difference between Externalization and Serialzation
 difference between the >> and >>> operators     -  
 Difference between PHP echo() and PHP print()?     -  
 difference between upcasting and downcasting     -  
 difference between the String and StringBuffer     -  
 find the difference between dates in asp.net     -  
 difference between a Window and a Frame     -  
 difference between a MenuItem and a CheckboxMenuItem     -  
 difference between the Boolean & operator and the &&     -  
 Difference between throw and throws     -  
 Difference between forward and sendRedirect     -  



Topic Tags

Java Serialization






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com