Class Hierarchy        Index

Class COM.cloudscape.core.ChannelSystem

java.lang.Object
   |
   +----COM.cloudscape.core.ChannelSystem

public class ChannelSystem
extends Object
Copyright © 1998-1999, Cloudscape, Inc. All rights reserved.

Boot mechanism for starting up a Cloudscape system inside a Marimba Castanet channel. Cloudscape systems that run in Castanet channels must use this mechanism to boot.

When running inside a Castanet channel, databases can be located in either the channel directory or the data directory. A given system (and therefore a given channel) can have one or the other, but not both. The location of the databases is specified by the boot method of this class.

If the system is booted without specifying databasesInChannel or if databasesInChannel=true in the boot method's parameters, then all databases are relative to the channel root. That is, the complete database name is the channel root path plus the database name given on the connection URL. Databases located in the channel are read-only (since all files in the channel are read-only).

If the system is booted with databasesInChannel=false, then the default location of databases follows the usual rules, and databases can be written to as well as read. Databases will be located relative to cloudscape.system.home or the current working directory if cloudscape.system.home is not set. Since the current working directory is not likely to be anywhere useful in the Castanet environment, it is advisable to use absolute path names. For example, the following code gives a database URL that connects to a database named "db" in the channel's data directory:

In either case, the cloudscape.properties file is relative to the channel root.

Cloudscape reserves the right to change, rename, or remove this interface at any time.


Constructor Index

 o ChannelSystem()

Method Index

 o boot(IApplicationContext)
Bring up the system inside a Castanet channel.
 o boot(IApplicationContext, boolean)
Bring up the system and specify whether databases should be looked for in the channel or in the usual manner.
 o shutdownSystem()
Shut down the system in the standard way.

Constructors

 o ChannelSystem
 public ChannelSystem()

Methods

 o boot
 public static Driver boot(IApplicationContext context) throws SQLException
Bring up the system inside a Castanet channel. Databases will be opened relative to the channel directory. The application context describes the Castanet channel we're running in. Returns a driver to use to connect to databases in the system.

The default properties are:

Throws: SQLException
upon Cloudscape JDBC driver registration failure.
 o boot
 public static Driver boot(IApplicationContext context,
                           boolean databasesInChannel) throws SQLException
Bring up the system and specify whether databases should be looked for in the channel or in the usual manner. The application context describes the Marimba channel we're running in. Returns a driver to use to connect to databases in the system.

Throws: SQLException
upon Cloudscape JDBC driver registration failure.
 o shutdownSystem
 public static void shutdownSystem()
Shut down the system in the standard way.


  Class Hierarchy        Index