Skip Headers

# Post-Migration Changes

Previous

Next

After you migrate the `orion-ejb-jar.xml` file persistence configuration to your `toplink-ejb-jar.xml` file, consider the following post-migration changes:

- Recovering persistence-type Table Column Size

- Updating the Unknown Primary Key Class Mapping Sequence Table

- Project Customization

Recovering persistence-type Table Column Size

In the `orion-ejb-jar.xml` file, you can specify this mapping, `cmp-field-mapping`, with a `persistence-type` attribute that provides both the type and column size as shown in Example: A cmp-field-mapping with persistence-type Specifying a Column Size.

A cmp-field-mapping with persistence-type Specifying a Column Size

    <cmp-field-mapping ejb-reference-home="MyOtherEntity" name="myField" persistence-name="myField" persistence-type="VARCHAR2(30)">

The TopLink migration tool migrates the persistence type but not the column size because a TopLink project does not normally contain this size information.

To recover the `persistence-type` column size, do the following:

1. Perform the migration as described in "Using the TopLink Migration Tool From the Command Line".

2. Launch the generated TopLink Workbench project file `TLCmpProject.mwp`.

3. Log in to your database (see "Logging In and Out of a Database").

   TopLink Workbench retrieves all column sizes.

Updating the Unknown Primary Key Class Mapping Sequence Table

TopLink supports the use of an unknown primary key class (see "Unknown Primary Key Class Support") and so the TopLink migration tool also supports this feature.

OC4J uses a native run-time key generator to generate unique keys for auto-id key fields. In contrast, TopLink uses a sequencing table.

If your OC4J persistence configuration includes the use of an unknown primary key class, then the TopLink migration tool will create a sequencing table for this purpose.

Before deploying your application after migration, you must do the following:

1. Determine the largest key value generated prior to migration.

2. Manually update the counter of the TopLink migration tool-generated sequence table to a number that must be one larger than the largest key value generated prior to migration.

Project Customization

You can customize the following components of your project:

- EJB 3.0 Persistence Manager Customization

- EJB 2.1 Persistence Manager Customization

- Session Event Listener