|Oracle8i Server Installation and Database Administration Guide
Release 3 (8.1.7) for Fujitsu Siemens Computers BS2000/OSD
Part Number A95466-01
This chapter describes what is BS2000 specific for Java in the database. Parts of this chapter are:
For more information see Oracle8i Java Documentation (a complex of manuals).
In order to not disturb non-Java users and save resources not used outside Java (e.g. memory pool size, disk space, CPU overhead) Java must be explicitly enabled in ORAENV file:
When ENABLE_JAVA is set to FALSE (which is also the default value), Java in the database is switched off.
Since Oracle 8.1.7 (for the first time) Oracle is using Posix interfaces. This does not mean that Oracle 'is running in Posix' or 'is under control of Posix', the difference is, that a few Posix APIs will be used by Oracle whereas the overwhelming majority of APIs is still native BS2000 (e.g. PAM calls, common memory pools, sockets etc.).
However, some prerequisites are necessary to install a java enabled database:
The name of this directory is a value of a parameter in ORAENV file:
where the Posix directory is /oracle.
You must use single quote marks to distinguish between lowercase and uppercase letters in the directory name.
You must not use the
/DO option to call this procedure.
The procedure INSTALL.P.JAVA copies two special files (classes.bin and libcorejava.so) into the specified Posix directory and changes the value of JAVA_HOME in $ORACL817.DEMO.P.ORAENV.
When you call $ORACL817.INSTALL.P.SUPER and set the JAVA parameter to YES, you'll get a suitable ORAENV file (with ENABLE_JAVA=TRUE and JAVA_HOME as described above), a database sized to Java requirements and Java installed inside the database.
When you try to make an existing Oracle817 database Java enabled you can use the Java related parts of this procedure as an example and modify it according to your needs (i.e. increase dbsize, increase shared_pool_size, create a large rollback segment, run initjvm.sql etc.) For more information see Oracle8i Java Developer's Guide.
In a Java Enabled Database a trigger aurora$server$shutdown is defined which fires before shutdown of the database. This can result in starting an event monitor process during shutdown, thus slowing down the shutdown. This trigger is only needed for dynamic listener registration for the MTS server. If you do not use Multi Threaded Servers, you can prevent this event monitor process by running the following SQL command when connected as internal:
When after successful installation you get the message
you should ask your BS2000 administrator to increase the number of UFS devices by modifying the parameter NOSTTY in the configuration file SYSSSI.POSIX-BC.version.
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:
|Statement or API||File type||Place||Default
|CREATE JAVA CLASS
|.class||BS2000 PAM file or POSIX||binary||not applicable|
|CREATE JAVA RESOURCE
|.properties||BS2000 PAM file or POSIX||ascii||none (i.e. there is no means to change default encoding)|
|CREATE JAVA SOURCE
|.java, .sqlj||BS2000 PAM file or POSIX||ascii||execute dbms_java.
(' ', 'encoding', 'WE8BS2000')
|CREATE JAVA SOURCE AS||.sql||part of statement||session character set specified in NLS_LANG||NLS_LANG|
|*, .jar, .zip||POSIX||none||option encoding in loadjava call
(i.e this is a required parameter of dbms_java.loadjava
|java.io-package||*||POSIX||DB charset||depends on the classes used|
BS2000 PAM files in ascii can be created by file transfer (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 preceeding slash ('/'). As a consequence no relative path names are allowed for Posix filenames.
However there is one exception: when used within dbms_java.loadjava relative path names are preceeded by the value of JAVA_HOME in ORAENV file (see above).
As far as Input/Output 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 (see Oracle8i SQLJ Developer's Guide and Reference). The system property file.encoding is not used when compiling a source file. Instead the default is latin1 (see Oracle8i Java Developer's Guide). You can change this default by either using the procedure
or by setting the encoding option of the procedure dbms_java.loadjava.
Due to a bug in the Oracle JAVAVM you always have to set the encoding option when loading a source file with dbms_java.loadjava.
This utility is not available on BS2000, however you can use within SQL*Plus the dbms_java.loadjava (resp. dropjava) package which is almost as capable as the loadjava utility (for more information see Oracle8i Java Documentation).
Of course you can use the loadjava utility from a Unix or Windows platform to load Java objects into a BS2000 Oracle8i database.
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:
We don't support