Home > Development > Java Beans, Introspection, Reflection

Java Beans, Introspection, Reflection

  • Bean Persistence: http://download.oracle.com/javase/tutorial/javabeans/persistence/index.html
  • A bean has the property of persistence when its properties, fields, and state information are saved to and retrieved from storage.
  • The mechanism that makes persistence possible is called serialization. Object serialization means converting an object into a data stream and writing it to storage.
  • All beans must persist. To persist, your beans must support serialization by implementing either the java.io.Serializable(in the API reference documentation) interface, or the java.io.Externalizable(in the API reference documentation) interface.
  • Any class is serializable as long as that class or a parent class implements the java.io.Serializable interface. Examples of serializable classes include ComponentStringDateVector, and Hashtable. Thus, any subclass of the Component class, including Applet, can be serialized. Notable classes not supporting serialization include ImageThreadSocket, and InputStream. Attempting to serialize objects of these types will result in an NotSerializableException.
  • Long-term persistence is a model that enables beans to be saved in XML format.
Advertisements
Categories: Development
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: