Externalization Service

This service defines the means for converting objects into a form suitable for export over general media, such as network streams or disk storage, and then re-constituting this data back into object references, potentially in a different ORB and/or process. The service allows for “pluggable” data formats for externalized objects, but a standard serialized format for objects is provided, to ensure that a baseline protocol can be shared amongst users of the service.

The Externalization Service uses a streaming model for externalizing and internalizing objects, where objects that support the function can be read or written using a stream.

A Stream object externalizes and internalizes objects. A StreamFactory creates Streams. Specific sources or destinations for streams can be supported by subclasses of the StreamFactory (e.g., FileStreamFactory). Object’s that are to be externalized must extend the Streamable interface.

The Life Cycle Service is used by this service to create and destroy Stream and StreamFactory objects. The Relationship Service is used to manage the externalization of graphs of related objects.

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.