Communicator e3000 MPE/iX Release 6.0 Express 1 (C.60.01) (30216-90286)
38 Chapter3
Technical Articles
HP Driver for JDBC
The only time the monitor should ever be brought down is to install a newer version. In
this case, use the JSTOPMON stream job or ABORTJOB command to kill the monitor process.
The ABORTJOB command to shut down the monitor is:
: ABORTJOB #JXX
where XX is the job number.
To restart the monitor after it was shut down or accidentally terminated, use the JSTRTMON
stream job to start it up.
: STREAM JSTRTMON.JDBC.SYS
On the MPE/iX platform, each client connection is serviced by a separate process that is in
the same session as the monitor. Thus, if the monitor is terminated or dies, the existing
server process already serving the client requests will also die. This could result in client
applications experiencing dropped connections.
Using the HP Driver for JDBC
Java Class Path
Before the HP Driver for JDBC can be used, the Java class path must be set to include the
HP Driver for JDBC class files. Without this setting, both the Java compiler and the Java
Run Time Environment will not be able to locate the HP Driver for JDBC. Please refer to
your JDK documentation for more explicit details as to how to set the Java class path. In
general, the Java class path must include the directory in which the HP Driver for JDBC
class files have been installed.
If the HP Driver for JDBC class files are installed in:
/opt/java/lib/com/hp/jdbc/allbase
then the Java class path must include the directory:
/opt/java/lib
In most cases, this would mean that the CLASSPATH environment variable must be set to
something resembling:
Example on the HP 9000
CLASSPATH=/opt/java/lib:.
Sample JDBC Client
The HP Driver for JDBC comes with the source code to two JDBC applications, a sample
client and a simple client. Both can be used to test the installation of JDBC components on
the client and server.
The simple client is called SimpleClient and is a bare-bones text-based application that
makes a connection to an ALLBASE/SQL or IMAGE/SQL database, and allows the user to
send SQL statements and retrieve the results. There are no frills in the application, to
make the code as simple as possible. This client should mainly be used for educational
purposes. The rest of this discussion will focus on the more robust application.
The sample client is called SampleClient and is a more robust version of the simple client.