Basic HTML version of Foils prepared Aug 14 1997

Foil 88 Persistence and Serialization

From JavaBeans CORBA ComponentWare UC Web applications Certificate -- Aug 11,14 97. by Geoffrey C. Fox, Wojtek Furmanski


Persistence of an object implies that one can save its value to some permanent store (e.g. a disk) and read it back
This is implemented using Serializable (default saving) or Externalizable (user defined saving)
In saving a Java Object, we save the values of data members but assume that the entity reading back object has access to class definition so that one just needs data member values to define instance
  • Only save public, protected and private members but not static ones as these are defined in class definition
  • transient variables are not saved
  • If you have confidential data declare it as private transient (and define its value in encoded fashion using non transient variables) or use Externalizable Interface



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Jan 8 1998