Oracle8i SQLJ Developer's Guide and Reference
Release 8.1.5

A64684-01

Library

Product

Contents

Index

Prev  Chap Top Next

Overview of SQLJ Components

This section introduces the main SQLJ components and the concept of SQLJ profiles.

SQLJ Translator and SQLJ Runtime

Oracle SQLJ consists of two major components:

In addition to the translator and runtime, there is a component known as the customizer. SQLJ automatically invokes a customizer to tailor your SQLJ profiles for a particular database implementation and any vendor-specific features and datatypes. By default, SQLJ uses the Oracle customizer so that your application can use Oracle-specific features.

SQLJ Profiles

SQLJ profiles are serialized Java objects (or optionally classes) generated by the SQLJ translator which contain details about the embedded SQL operations in your SQLJ source code. The translator creates these profiles, then either serializes them and puts them into binary resource files, or puts them into .class files (according to your translator option settings).

About Profiles

SQLJ profiles are used in implementing the embedded SQL operations in your SQLJ executable statements. Profiles contain information about your SQL operations and the types and modes of data being accessed. A profile consists of a collection of entries, where each entry maps to one SQL operation. Each entry fully specifies the corresponding SQL operation, describing each of the parameters used in executing this instruction.

SQLJ generates a profile for each connection context class in your application, where typically each connection context class corresponds to a type of database schema you connect to. (There is one default connection context class, and you can declare additional classes.) The SQLJ standard requires that the profiles be of standard format and content. Therefore, for your application to use vendor-specific extended features, your profiles must be customized. By default this occurs automatically, with your profiles being customized to use Oracle-specific extended features.

Profile customization allows database vendors to add value in two ways:

For example, you must customize your profile in order to use Oracle objects in your SQLJ application.


Notes:

  • By default, SQLJ profile file names end in the .ser extension, but this does not mean that all .ser files are profiles. Any serialized object uses that extension, and a SQLJ program unit can use serialized objects other than its profiles. (Optionally, profiles can be converted to .class files instead of .ser files.)

  • A SQLJ profile is not produced if there are no SQLJ executable statements in the source code.

 

Binary Portability of Profiles

SQLJ-generated profile files feature binary portability. That is, you can port them as is and use them with other kinds of databases or in other environments if you have not employed vendor-specific database types or features. This is true of generated .class files as well.




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index