Home | Top | Next | Prev |
Please email any bug reports, comments or suggestions to:
peter.hearty@ceasar.demon.co.uk
Note that RMI (Java Remote Method Invocation) is only available from JDK 1.1 onwards. Development environments which do not fully support RMI will be unable to utilise the driver.
The instructions that follow were based on a very early release of Pierre-Yves work. Significant additions have been made since the first release. For up to date installation and usage instructions please refer to Pierre-Yves web site.
The archive unpacks to a single JAR file which can in turn be unpacked using the JDK 1.1 command line tool:
jar xvf RmiJdbc.jar
This will leave the classes and source code in the current directory. As usual, the classes have to appear somewhere in your CLASSPATH. for the rest of this discussion I'll assume that they've been placed under the same Classes directory as InstantDB itself. So the InstantDB directory structure now looks like:
Classes/db | this holds the database classes |
Classes/jdbc | the jdbc driver implementation classes |
Classes/RmiJdbc | the remote JDBC driver classes |
Doc | a copy of this web site |
Sample | holds the sample files |
Exmaples | simple sample |
JDBCAppl | allows you to dump some of the system files |
TrigExpl | Example of InstantDB triggers |
Make sure that your system has TCP installed. In what follows I'll assume that we're testing out on a machine with a loopback driver installed. Otherwise you'll have to make appropriate changes to the instructions for separate client and server installations. Next, start the RMI registry. This allows remote objects to be found on the network. The JDK 1.1 command is simply:
rmiregistry
Don't be surprised if you don't get too much feedback from this program. It's designed to run as a background process. If you simply type it in as above on windows NT then it will take up that command line session.
If you haven't already run the InstantDB sample program then do so now. This will generate a small database that you will be able to access via the RMI driver. when the sample program has finished, stay in the sample classes directory and type:
java RmiJdbc.RJJdbcServer jdbc.idbDriver
This will start the RmiJdbc remote server. Once again, If you're on NT then this will take up a command line session. If all goes well you'll see the following:
Binding RmiJdbcServer... jdbc.idbDriver registered in DriverManager
The driver is now ready to accept remote database requests. Change to the directory with the RmiJdbc source code. Edit TestClient.java so that the line containing "//localhost/RmiJdbcServer" points to the server. You'll have to change "localhost" to something meaningful to your environment. Compile the resultant file to generate the TestClient.class file.
Run the TestClient.class file. You should see the RmiJdbc.RJJdbcServer come to life by invoking InstantDB and running the SQL request from issued by TestClient.
Home | Top | Next | Prev |