Browse Prior Art Database

Competitive persistence mapping migration

IP.com Disclosure Number: IPCOM000013178D
Original Publication Date: 2003-Jun-17
Included in the Prior Art Database: 2003-Jun-17
Document File: 3 page(s) / 65K

Publishing Venue

IBM

Abstract

Disclosed is a method that uses a SQL DDL file for finding a correspondence between the persistence mapping meta-data formats of J2EE application servers. This method can be used in the migration of persistence mapping from one J2EE application server to another.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 39% of the total text.

Page 1 of 3

Competitive persistence mapping migration

When migrating a Java* 2 Platform Enterprise Edition (J2EE*) application from one application server to another, it is often the case that the mapping of Container Managed Persistence (CMP) Entity Enterprise Java Beans (EJB) to a backend database schema needs to be preserved. Disclosed is a method for finding a correspondence between the persistence mapping meta-data formats of the two J2EE application servers. The format of this mapping is not part of the J2EE specification and differs from one application server vendor to another. It is often the case that elements that are mandatory for the mapping of CMP Entity EJBs to a backend database of one application server are missing from the persistence mapping meta-data of another application server.

The method disclosed here consists in using a SQL Data Definition Language (DDL) file that corresponds to the database where the Entity EJBs are persisted to migrate the persistence mapping meta-data from one J2EE application server to another. The DDL file is specific to a database vendor and contains information like the name of the database tables, the column types, the primary and foreign key information, etc. The method works by parsing and correlating data found in the DDL file, the source application server specific persistence mapping information (usually stored in an Extensible Markup Language (XML) or properties file), and the EJB Deployment Descriptor file. The correlated data is then used to generate the Entity EJBs to database mapping files for the target application server.

This technique was implemented in a utility that migrates J2EE applications from the BEA Systems, Inc WebLogic** Server (hereafter referred to as WebLogic) v5 and v6 to the IBM WebSphere*** Application Server (hereafter referred to as WebSphere) v4. The utility migrates the WebLogic deployment descriptors extensions and the persistence mapping meta-data to the WebSphere format. To better illustrate the usage of this method, below are portions from a sample DB2 DDL file and a WebLogic v6 persistence file that shows the mapping of a simple CMP Entity EJB. The information in these files is used to generate the equivalent WebSphere v4 persistence files.

WebLogic Application Server v6 Persistence File DDL file

<!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB 1.1 RDBMS Persistence//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms11-persistence-600.dtd'> <weblogic-rdbms-jar> <weblogic-rdbms-bean>

<ejb-name>containerManaged</ejb-name>

<data-source-name>examples-dataSource-demoPool</data-source-name>

<table-name>ejbAccounts</table-name>

<field-map>

<cmp-field>accountId</cmp-field>

<dbms-column>id</dbms-column>

</field-map>

<field-map>

<cmp-field>balance</cmp-field>

<dbms-column>bal</dbms-column>

</field-map>

<field-map>

CREATE TABLE ejbAccounts

(id VARCHAR(250) NOT NULL,

bal DOUBLE,

type VARCHAR(250));

ALTER TABLE ejbAccounts

ADD...