uCosminexus Application Server, Application Setup Guide
This section explains the mapping of the fields of a CMP1.x Entity Bean to a table in the database.
Entity Bean attribute file
Execute the following command to acquire an Entity Bean attribute file:
cjgetappprop [server-name] [-nameserver provider-URL] -name J2EE application-name -type ejb -resname EJB-JAR-display-name/Entity-Bean-display-name-c path-of-the-Entity-Bean-attribute-file |
cjgetappprop MyServer -name adder -type ejb -resname account/MyAccoub -c C:\home\adder_ejb.xml
Execute the following command to apply the values of the Entity Bean attribute file:
cjsetappprop [server-name] [-nameserver provider-URL] -name J2EE application-name -type ejb -resname EJB-JAR-display-name/Entity-Bean-display-name-c path-of-the-Entity-Bean-attribute-file |
cjsetappprop MyServer -name adder -type ejb -resname account/MyAccoub -c C:\home\adder_ejb.xml
The following table describes the property settings for mapping the fields of CMP1.x Entity Bean to a table in the database (<cmp-map>):
| Items | Mandatory | Corresponding tags |
|---|---|---|
| Display name of the resource adapter#1 | Y | <datasource-name> |
| Catalog name of the database | O | <catalog-name> |
| Schema name of the database | O | <schema-name> |
| Table name of the database | Y | <table-name> |
| Permission or prohibition of writing to the database | Y | <read-only-access> |
| Transaction isolation level#2 | O | <transaction-isolation> |
| Method of comparing the data by writing to the database | O | <concurrency-protection> |
| Information of mapping between the field and the table column#3 | Y | <field-impl> |
| Search conditions of the finder method#4 | Y | <finder-impl> |
| Items | Corresponding tags |
|---|---|
| Field name of the EntityBean | <field-name> |
| Column name of the table | <column-name> |
| Items | Corresponding tags |
|---|---|
| Method name of the finder method | <method-name> |
| Search condition for the table | <where-clause> |
For details on the property settings, see 3.5.1 Contents of the Entity Bean property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.