When using automatic persistence, EJB Server manages all interaction with the database. There are two options for database storage when using automatic persistence:
Using mapped fields In the mapped table model, you define a mapping from a database table to fields in your component implementation class. When a write to the database is required, EJB Server reads the field values; after reading new data from the database, EJB Server assigns new field values for each mapped database column. This model corresponds to the Container Managed Persistence model required by the EJB 1.1 specification.
Using binary storage In this model, you define state-accessor methods and an IDL state type. EJB Server calls your state-accessor methods before writing data to the database and after reading from the database. The state data is stored in an encoded binary form. Because the relational data is encoded, this model does not support finder methods other than findByPrimaryKey.
Identifying the storage technique
The component uses mapped field storage if the value of the
Table field on the Persistence tab begins with map:
,
for example, map:MyTable
.
To configure automatic persistence: