Starting and Shutting Down the Cloudconnector Server
Page 3 of 5

Starting Cloudconnector on the Server

Start Cloudconnector by running the included scripts and setting some basic properties. You need to modify these scripts for your environment.

To successfully complete the steps in this chapter, you will need to know the following:

  • The location of your Cloudscape and Cloudconnector installation
  • The location of your weblogic.properties file and CloudscapeServer directory
  • The location of your databases
  • Any customizations you may need to make to your weblogic.properties file, including modifying the default password or the listening port number

This chapter is divided into two major sections:

Startup Tasks

Step One: Open a Command Window for Starting the Server

Open a command window. You will set up the server environment in this window using commands in the provided scripts.

Step Two: Include Cloudconnector in the PATH Variable

For the scripts to work properly, the PATH variable must include the Cloudconnector installation directory: $CLOUDSCAPE_INSTALL/frameworks/cloudconnect/bin (where $CLOUDSCAPE_INSTALL is the directory in which you installed Cloudscape). This directory should appear in the path before any other Cloudscape directories.

Step Three: Modify the class path Script (setServerCloudscapeCP)

In this step, modify the script that sets the class path on the server. While you can set the class path directly from the command line, you may find it easier to use the included scripts. They are located in $CLOUDSCAPE_INSTALL/frameworks/cloudconnect/bin. Modify the appropriate script for your platform:

NOTE: If your platform does not support scripts, use these files as examples.

The setServerCloudscapeCP script sets the CLOUDSCAPE_INSTALL variable to point to the Cloudscape installation directory, and then modifies the CLASSPATH variable to include that directory.

  1. In setServerCloudscapeCP.bat (or ksh), modify the value of CLOUDSCAPE_INSTALL to point to the Cloudscape installation directory on your machine.
  2. Typically, you do not need to modify the second line in this file, which sets the class path. However, to add application-specific libraries (i.e., for Java data types), modify the CLASSPATH line to include any .zip, .jar, or class files which contain Java types referred to in SQL-J statements, work units, views, or tables in your database.

    At a minimum, the Cloudconnector class path must include:

    • frameworks/cloudconnect/classes
    • frameworks/cloudconnect/lib/weblogicaux.jar
    • frameworks/cloudconnect/license
    • lib/cloudscape.jar or lib/cloudsync.jar

Step Four: Modify the Startup Script (startCS)

In this step, modify the script that you will use to start up the server. While you can start up the server directly from the command line, you may find it easier to use the provided scripts.

They are located in $CLOUDSCAPE_INSTALL/frameworks/cloudconnect/bin. To view a printout of startCS, see The Cloudconnector Scripts.

Modify the startCS script to reflect the correct settings for two properties in the java command line:

If you do not set these system properties, Cloudscape assumes you intend the current directory for both (see Default File Configuration).

  • weblogic.system.home

    Set this property to the directory holding the weblogic.properties file and the Cloudscape-Cloudconnector server directory. By default, the properties file and CloudscapeServer directory are located in
    frameworks/cloudconnect, beneath the Cloudscape installation directory. The directory to which weblogic.system.home points must exist at the time the server starts up, because the server looks in it for the weblogic.properties file.

  • cloudscape.system.home

    Set this property to the directory containing your Cloudscape databases and the optional cloudscape.properties file. This directory can be anywhere on your system, including the directory to which the weblogic.system.home property points.

NOTE: At the time the server starts, the directory to which weblogic.system.home points must contain a directory called CloudscapeServer and the weblogic.properties file.

To specify these properties, modify the JVM -D command-line options in the startCS script. For example:

-Dweblogic.system.home=c:\srvStartDir 
-Dcloudscape.system.home=c:\myDBDir

The following figure illustrates how you would modify these system properties.

Figure 3-1 The cloudscape.system.home and weblogic.system.home directories

When you have finished altering the startCS script, it should look similar to the following:

java -ms16m -mx32m -noasyncgc 
    -D
weblogic.system.home=c:\myweblogichome
    -D cloudscape.system.home=d:\mydatabases     COM.cloudscape.core.CloudscapeServer

Default File Configuration

If you run the startCS script without modifying it, the directory from which you run it effectively becomes the location for the cloudscape.system.home and the weblogic.system.home properties. It must therefore contain the following files and directories, as illustrated in Figure 3-2:

  • the Cloudscape database(s) that you want to access
  • the weblogic.properties file
  • the directory for Cloudconnector

    Typically, this directory is named CloudscapeServer. You can specify a different name by resetting the weblogic.system.name property (see Setting Cloudconnector Properties).

  • the cloudscape.properties file (optional)

If startCS is run from the frameworks/cloudconnect subdirectory, the weblogic.properties file provided with Cloudscape is used, no cloudscape.properties file is used, and the current directory becomes the system directory--that is, it holds Cloudscape database directories and the CloudscapeServer directory.

Figure 3-2 The default layout of directories and properties files.

Step Five: Optionally Modify weblogic.properties

You may need to modify the weblogic.properties file that will be used by Cloudconnector upon startup.

Two common customizations are:

There are numerous other customizations you can make, described in Setting Cloudconnector Properties.

NOTE: If you will be using the weblogic.httpd.documentRoot property, you will need to uncomment and customize the default entry for the directory path in the weblogic.properties file. This property affects the way the administrative servlet displays HTML pages.

Setting a Password

A password is required for Cloudconnector. You can locate and use the default password provided in the weblogic.password.system property of the weblogic.properties file, or you can modify this property to reflect a different password.

Modifying the Port Number

By default, Cloudconnector listens for client requests on port 7001. You can change this number by changing the value of weblogic.system.listenPort in the weblogic.properties file.

NOTE: Do not use the same port number for both client requests and incoming synchronization refresh messages (determined by the cloudscape.DataComm.port variable). For more information, see the Cloudscape Synchronization Guide.

Step Six: Run Both Scripts

After you have modified both scripts to reflect your environment, run them in the following order to start up the Cloudconnector server:

  1. Run the setServerCloudscapeCP script in the command window to set the class path:

    c:\> setServerCloudscapeCP

  2. Run the startCS script to start Cloudconnector:

    c:\> startCS

Typically, you should see messages showing that Cloudconnector is starting. Once Cloudconnector starts, you can access it from a client application or applet, using the WebLogic client tools or simply the client JDBC driver and database connection URL.

Following is a sample excerpt of messages you might see:

Fri Sep 10 13:28:22 PDT 1999:Opened log file .\CloudscapeServer\weblogic.log
Fri Sep 10 13:28:22 PDT 1999:<I> <WebLogicServer> Read global properties .\weblogic.properties
Fri Sep 10 13:28:22 PDT 1999:<I> <WebLogicServer> No per-server properties files found
Fri Sep 10 13:28:22 PDT 1999:<I> <WebLogicServer> ************ WebLogic Server (
4.5.0 07/29/1999 01:25:14 #49037) 'CloudscapeServer' from directory path .
Fri Sep 10 13:28:22 PDT 1999:<I> <WebLogicServer> ************ (c) 1995, 1996, 1997, 1998 WebLogic, Inc., (c) 1999 BEA Systems, Inc.
Fri Sep 10 13:28:22 PDT 1999:<I> <Config> Current properties list
Fri Sep 10 13:28:22 PDT 1999:<I> <Config> [0=Current 1=Command line 2=Per-server properties file 3=Global properties file 4=Embedded defaults ]

Verifying Startup

You can use the WebLogic utility class utils.t3dbping to verify that Cloudconnector is running and that database services are available through it. For example, if you have a database pingDB available at the cloudscape.system.home location for Cloudconnector running on your machine on port 7001, the following should succeed:

java utils.t3dbping t3://hostname:portnumber "" "" ""
    COM.cloudscape.core.JDBCDriver jdbc:cloudscape:pingDB

Enter this command in a single line. The "" arguments are needed to satisfy the utils.t3dbping command.

To test only the availability of the WebLogic services:

java weblogic.T3Admin t3://hostname:portnumber Connect 1