Cloudscape Access Using RmiJdbc
Page 4 of 6

Starting and Stopping the RmiJdbc Server

Starting the Server

There is no need to start a separate RMI registry daemon. The RMI Registry service for the RmiJdbc server is embedded and runs inside the server itself.

The startCS.bat (Windows) and startCS.ksh (UNIX) scripts start the server, and the stopCS.bat (Windows) and stopCS.ksh (UNIX) scripts stop it. These scripts are located in the $CLOUDSCAPE_INSTALL/frameworks/RmiJdbc/bin directory. The RmiJdbc server package itself resides in the $CLOUDSCAPE_INSTALL/frameworks/RmiJdbc/classes directory.

For example, if you have installed Cloudscape in the default directory on the C drive (in Windows), go to the directory where your Cloudscape databases will reside and type the following command:

start C:\cloudscape\frameworks\RmiJdbc\bin\startCS.bat

You can set C:\cloudscape\frameworks\RmiJdbc\bin in your path to shorten the command.

Altering the StartCS Script

You can modify the StartCS script to do any of the following:

  • disable RMI registry creation from inside an RmiJdbc server

    Add -noreg after RJJdbcServer.

  • specify a port number other than the default (1099) for the RMI registry

    Add -port <portnumber> after RJJdbcServer.

  • add additional JDBC driver classes to register

    List the classes after RJJdbcServer.

  • prevent dumping of informational messages to the console

    Add -DRmiJdbc.verbose=false after the jre command.

  • cause the application not to exit from the JVM on shutdown

    Add -DRmiJdbc.exitOnShutdown=false after the jre command.

  • load the RMI security manager (the default behavior is not to load the security manager)

    Add -sm after RJJdbcServer.

Shutting Down the Server

To shut down the RmiJdbc server, use the stopCS.bat on Windows or stopCS.ksh on UNIX. StopCS shuts down Cloudscape as well as the RmiJdbc server. If you have enabled user authentication with the cloudscape.connection.requireAuthentication property, you must provide user credentials for shutdown. To do this, add a user name and password to the first line of the stopCS.bat or stopCS.ksh file. For example:

java RJPing jdbc:rmi:jdbc:cloudscape:;shutdown=true;user=YOURUSERNAME;
password=PWD connect

(This should all be written on one line.)