PL/SQL-Java Migration Toolkit
The Oracle PL/SQL language gives Oracle the technology edge in the field of SQL based relational Databases. PL/SQL provides many additional language functions not found in the standard SQL language.
However with the arrival of the Internet Technology and the Java language, additional criteria are going to make the difference. Hence the need to have next to PL/SQL another language performing similar functionality.
The PL/SQL-Java Migration Toolkit (P>J) enables deployment of business logic based on the Oracle PL/SQL code as pure Java applications with support for further migration. The PL/SQL program units are translated into pure Java source code, supported by the Open Runtime Framework. This includes all packages, stored procedures and functions.
Migration of PL/SQL stored procedures into Java offers the following benefits:
- Reuse existing code base
- Migration to Open Standards
P>J performs source-to-source conversion of Oracle 8i PL/SQL stored procedures and functions into pure Java code, preserving the transactional behavior and code structure of the source. Converted procedures can be executed by applications in the same way as the original ones.
The resulted code can be compiled and run under Oracle Aurora Java Virtual Machine, or under any other Java 2tm compliant Java Virtual Machine. The resulting code is built on top of the industry standard Java Database Connectivity (JDBC), and InfoBus.
Depending on the edition of P>J, the Open Runtime Framework can be provided in different packages, from compiled .jar files for evaluation purposes to an open source library for corporate customers willing to migrate.
After the migration the resulting code can:
- replace the exiting PL/SQL code
- be installed into a separate database
- packed for later installation into a single self installing .exe or .jar file.
- be prepared for later development with the necessary project information
- be split into tiers or, on the contrary, merged according to performance considerations.
Two main components of the product can be identified:
P>J performs the conversion of PL/SQL modules into Java, by relying on the Open Runtime Framework. It is designed as classical three-pass compiler, regular translation patterns with heuristics to simplify the resulting code. All PL/SQL types are mapped into Java classes, with static and dynamic type support.
The Open Runtime Framework specifies all the interfaces necessary to re-implement PL/SQL language structures (control and data types) to Java. It consist of two layers: an Abstraction Layer and a set of implementations, forming an Implementation Layer. The abstraction layer defines Java interfaces and is what the compiler relies on. At the Implementation Layer all these interfaces are applied according to the details of the underlying drivers, etc..
Migration of PL/SQL stored procedures into Java saves investment already made in PL/SQL development, reduces cost by not requiring special training for developers and gives customer benefits of modern Java technology.