The weblogic-cmp-rdbms-jar.xml file contains mappings from EJB attributes to database columns used by Container-Managed Persistence (CMP) and Container-Managed Relationships (CMR).
The rule detects CMP field mappings in the weblogic-cmp-rdbms-jar.xml file. When the automated fix is provided it will attempt to generate the mappings needed by WebSphere(R) Application Server for the Container Managed Persistence to work. The mappings are sensitive to the database type and schema. Therefore, the automated fix will make a best-guess effort at choosing a correct schema for the database.
The database vendor can be configured in the properties panel of the rule. If set to Auto detect, the database-type setting in the weblogic-cmp-rdbms-jar.xml file determines the type of database used. If none is specified, Oracle is used. Only DB2(R), Oracle, SQLServer, and SQLServer2000 are supported database types. MySQL, POINTBASE, Informix(R), and Sybase cannot be migrated.
The following table displays the Java type to database column type used. If your database table schema deviates from this format, CMP might not work. In those cases, use the Meet-In-The-Middle setting in the EJB to RDB Mapping Wizard of Rational Application Developer to migrate the CMP mappings.
| Java Type | DB2 | Oracle | SQLServer |
|---|---|---|---|
| java.lang.Integer/int | INTEGER | INTEGER | INTEGER |
| java.lang.Double/double | DOUBLE PRECISION | DOUBLE PRECISION | DOUBLE PRECISION |
| java.lang.Float/float | FLOAT | FLOAT | FLOAT |
| java.lang.Short/short | INTEGER | INTEGER | SMALLINT |
| java.lang.Long/long | BIGINT | INTEGER | DECIMAL |
| java.math.BigDecimal | DECIMAL | DECIMAL | DECIMAL |
| java.lang.String | VARCHAR | VARCHAR | VARCHAR |
| java.lang.Character/char | CHAR | CHAR | CHAR |
| java.lang.Byte/byte | INTEGER | INTEGER | TINYINT |
| java.lang.Boolean/boolean | INTEGER | INTEGER | INTEGER |
| java.sql.Date | DATE | DATE | DATETIME |
| java.sql.Time | TIME | DATE | DATETIME |
| java.sql.Timestamp | TIMESTAMP | DATE | DATETIME |
| byte[]/java.io.Serializable | VARCHAR FOR BIT DATA | RAW | IMAGE |
During migration, the optimistic locking settings is migrated if possible. In the case that <verify-columns> is set to Timestamp or Version in the weblogic-cmp-rdbms-jar.xml file, optimistic locking will be enabled for the column specified under <optimistic-column>. This can only be done if the column is mapped to a CMP field, which in WebLogic is optional. If the column is not mapped, then a new field must be added manually to the enterprise bean and mapped to a column in the weblogic-cmp-rdbms-jar.xml file.
A <verify-columns> value of Read or Modified is not supported for migration.