This chapter describes what is BS2000 specific for Java in the database. Parts of this chapter are:
For more information, refer to Oracle Database 10g Java Documentation (a complex of manuals).
Since Oracle8i, for the first time, Oracle is using POSIX interfaces. This does not mean that Oracle 'is running in POSIX' but that a few POSIX APIs are used by Oracle. Whereas, the overwhelming majority of APIs is still native BS2000. For example, PAM calls, common memory pools, sockets, and so on. However, the POSIX part of Oracle must be installed.
INSTALL.P.POSIX copies two special files,
libcorejava.so, into the specified POSIX directory and changes the value of
When you call
$ORAC1020.INSTALL.P.SUPER and set the JAVA parameter to YES, you'll get a suitable
ORAENV file (with
ORACLE_HOME as described earlier), a database sized to Java requirements and Java installed inside the database.
When you try to enable Java an existing Oracle Database 10g, you can use the Java related parts of this procedure as an example and modify it according to your needs, that is, increase dbsize, increase
shared_pool_size, create a large rollback segment, run
initjvm.sql, and so on. For more information, refer to Oracle Database Java Developer's Guide.
After successful installation, when you get the following message you should ask the BS2000 administrator to increase the number of UFS devices by modifying the parameter
NOSTTY in the configuration file
CCM0090: ALL UFS TERMINAL DEVICES ARE IN USE OR PERMISSION DENIED
It is not absolutely straightforward where files used by Java have to be stored and how they should be encoded. In general files can reside in native BS2000 or in the POSIX file system, but there are exceptions.
The following table gives an overview of the file types, location, default encoding, and encoding modifications for APIs or statements
|Statement or API||File type||Place||Default encoding||Encoding modifications|
||.class||BS2000 PAM file or POSIX||Binary||Not applicable|
||.properties||BS2000 PAM file or POSIX||ascii||None, that is, there is no means to change default encoding)|
||.java, .sqlj||BS2000 PAM file or POSIX||DB charset||Execute
||.sql||Part of statement||Session character set specified in
||*, .jar, .zip||POSIX||DB charset||Option encoding in loadjava call|
||*||POSIX||DB charset||Depends on the classes used|
BS2000 PAM files in ascii can be created by transferring files (ftp) from an ascii platform to BS2000 in binary mode.
The distinction between a native BS2000 file name and a POSIX file name is made by the preceding slash ('/'). As a consequence, no relative path names are allowed for POSIX file names.
However, there is one exception: when used within
dbms_java.loadjava, relative path names are preceded by the value of
As far as I/O is concerned, the Oracle JAVAVM uses the database character set as system property
file.encoding. Therefore the following Oracle/BS2000 database character sets have been added to the list of supported Java encodings:
These encodings are not known to any other Java implementation.
The system property
file.encoding, however, does not apply to Java property files. Property files always use the encoding 8859_1 (refer to Oracle Database SQLJ Developer's Guide and Reference). The system property
file.encoding is used when compiling a source file. You can change this default by either using the following procedure or by setting the encoding option of the procedure
This utility is not available on BS2000. However, you can use the
resp.dropjava) package, within SQL*Plus, which is almost as capable as the
loadjava utility. For more information, refer to Oracle Database Java Developer's Guide).
You can use the
loadjava utility from a Unix or Windows platform to load Java objects into a BS2000 Oracle Database 10g.
A simple Java demonstration program running in the server is shipped under:
An example with database connection using the server-side internal driver is shipped under: