Oracle8i SQLJ Developer's Guide and Reference
Release 8.1.5

A64684-01

Library

Product

Contents

Index

Prev  Chap Top Next

SQLJ Runtime

This section provides information about the Oracle SQLJ runtime, which is a thin layer of pure Java code that runs above the JDBC driver. When Oracle SQLJ translates your SQLJ source code, embedded SQL commands in your Java application are replaced by calls to the SQLJ runtime. Runtime classes act as wrappers for equivalent JDBC classes, providing special SQLJ functionality. When the end-user runs the application, the SQLJ runtime acts as an intermediary, reading information about your SQL operations from your profile and passing instructions along to the JDBC driver.


Note:

A SQLJ runtime can be implemented to use any JDBC driver or vendor-proprietary means of accessing the database. The Oracle SQLJ runtime requires a JDBC driver but can use any standard JDBC driver. To use Oracle-specific database types and features, however, you must use an Oracle JDBC driver. For the purposes of this document, it is generally assumed that you are using an Oracle database and one of the Oracle JDBC drivers.  


Runtime Packages

The Oracle SQLJ runtime consists of the packages listed below. There are classes you can import and use directly in your application (primarily in sqlj.runtime), but most of the runtime classes are for internal use by SQLJ. Packages whose names begin with oracle are for Oracle-specific SQLJ features.


Note:

The packages sqlj.runtime.profile.util, oracle.sqlj.runtime.util, and oracle.sqlj.runtime.error are not included in runtime.zip, which contains classes used only at runtime. Because the classes in these packages are used only by the translator, they are located only in translator.zip.  


Categories of Runtime Errors

Runtime errors may be generated by any of the following:

In any of these cases, a SQL exception is generated as an instance of the java.sql.SQLException class or a subclass (such as sqlj.runtime.SQLNullException).

Depending on where the error came from, there may be meaningful information that you can retrieve from an exception using the getSQLState(), getErrorCode(), and getMessage() methods. SQLJ errors, for example, include meaningful SQL state and message. For information, see "Retrieving SQL States and Error Codes".

If errors are generated by the Oracle JDBC driver or RDBMS at runtime, look at the prefix and consult the appropriate documentation:

For a list of SQLJ runtime errors, see "Runtime Messages".




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index