Show TOC Start of Content Area

Procedure documentation Specifying Primary Key Deployment Properties  Locate the document in its SAP Library structure

Use

Use this procedure to specify the interval for the values of the primary key that the EJB Container will generate when you rely on the EJB Container to generate the primary key automatically. For more information, seeCreating Primary Keys.

When a client creates a new entity, the EJB Container reserves a block of sequences by changing the highest reserved primary key value. The length of this block of sequences is determined by the <unknown-pk-interval> element in ejb-j2ee-engine.xml. When you specify this deployment property, you must take into account how often bean instances are created. If you create a lot of bean instances, you must specify a larger value for this element. The default value is 100. The highest reserved value is stored in the database by the Configuration Manager. Thus, you can avoid losing data caused by a server process restart or failure.

Procedure

       1.      Open the ejb-j2ee-engine.xml.

       2.      From the Enterprise Beans tab, choose entity beans your container-managed entity bean.

       3.      In the Interval for generated primary keys field in the right-hand pane, specify the size of the interval.

Result

The value of this interval is stored in the <unknown-pk-interval> element in the deployment descriptor.

 

 

End of Content Area