Create the version column in the primary table.
Give the version column a numeric data type.
Provide appropriate update triggers on the version column.
These triggers must increment the version column on each update of the specified row.
Specify the version column.
This is specified in the check-version-of-accessed-instances subelement of the consistency element in the sun-cmp-mappings.xml file. See consistency in Sun GlassFish Enterprise Server 2.1 Application Deployment Guide.
Map the CMP bean to an existing schema.
Automatic schema generation is not supported for beans with version column consistency checking. Instead, work with your database administrator to create the schema and add the required triggers.