Hitachi

uCosminexus Application Server Application Setup Guide


9.6.1 CMP settings

Organization of this subsection

(1) Attribute file to be edited

Entity Bean attribute file

(2) Acquiring the attribute file to be edited and setting the attributes

(3) Attribute settings to be edited

The method of defining CMP differs based on whether the primary key is a single primary key or a compound primary key.

(a) Setting the attributes for a single primary key

You set the properties for a single primary key.

Check the persistence management type (<persistence-type>). In the case of CMP Entity Bean, 'Container' is set.

The following table describes the property settings for a single primary key:

Items

Mandatory

Corresponding tags

Primary key class#1

Y

<prim-key-class>

Scope of reentrant

Y

<reentrant>

Description of the persistence management field

O

<cmp-field> - <description>

Field name of the persistence management field#2

O

<cmp-field> - <field-name>

Field name of the primary key field

O

<primkey-field>

Legend:

Y: Mandatory

O: Optional

#1

Enter a class or interface that contains the primary key of this Entity Bean. The primary key class must be either a java.lang.Object class or a class or an interface in the same container-managed field.

#2

Normally, the field name is not required. If you want to add a field name, the field name also needs to be added in the class definition of the Entity Bean beforehand.

For details on the property settings, see 3.5.1 Specifications of the HITACHI Entity Bean Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.

(b) Setting the attributes for a compound primary key

You set the properties for a compound primary key.

Check the persistence management type (<persistence-type>). In the case of a CMP Entity Bean, 'Container' is set.

The following table describes the property settings for a compound primary key:

Items

Mandatory

Corresponding tags

Primary key class#1

Y

<prim-key-class>

Scope of reentrant

Y

<reentrant>

Description of the persistence management field

O

<cmp-field> - <description>

Field name of the persistence management field#2

O

<cmp-field> - <field-name>

Legend:

Y: Mandatory

O: Optional

#1

Enter a class or an interface that contains the primary key of this Entity Bean. The primary key class must be either a java.lang.Object class or a class or an interface in the same container-managed field.

#2

Normally, the field name is not required.

If you want to add a field name, the field name also needs to be added in the class definition of the Entity Bean beforehand.

For details on the property settings, see 3.5.1 Specifications of the HITACHI Entity Bean Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.