5.1. Introduction

Serializing objects is the process of taking the state portion of the in-memory representation of an object and turning it into a stream of bytes that can be used for moving into the address space of other applications, as well as storing it persistently for use at a later point in time.

Serializing objects, and consequently reverse serialization, can be a complex operation when objects contain other objects as part of their design. For example, a Bank object might contain Customer objects, which in turn contain Account objects. This sequence of objects containing other objects creates what is termed an "object graph." Figure 5-1 illustrates what the object graph looks like in memory. Serializing this tree-like structure requires ...

Get Enterprise Application Integration With XML and Java™ 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.