![]() |
![]() |
|
![]() |
||
Advanced ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Network Support
The client applications can either be on different physical systems from the server, or they can be on the same physical system. This is one way to achieve multiple simultaneous access to the same InstantDB database. 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 archive unpacks to a single JAR file: RmiJdbc.jar. Add this jar file to your CLASSPATH. (If you want to see the source code then you can unpack the jar using the JDK 1.1 command line tool: jar xvf RmiJdbc.jar) Make sure that your system has TCP installed. In what follows we'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. If you haven't already run the InstantDB sample program then do so now ( see install.htm for details). 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 Examples directory and type: java -nojit RmiJdbc.RJJdbcServer jdbc.idbDriver This will start the RmiJdbc remote server. If you're using NT/95/98 then this will take up a command line session. If all goes well you'll see the following: jdbc.idbDriver registered in DriverManager Binding RmiJdbcServer... RmiJdbcServer bound in rmi registry The driver is now ready to accept remote database requests. From a command prompt, enter the commands: cd <wherever RmiJdbc.jar is> jar -xf RmiJdbc.jar TestClient.java javac TestClient.java java -nojit TestClient You should see the RmiJdbc.RJJdbcServer come to life by invoking InstantDB and running the SQL request from issued by TestClient. Unpacking the jar file and examining TextClient.java should make it pretty obvious how to go about writing your own client programs. |