Using the Database Class Utilities,
Page 2 of 3


[top]
[prev]
[next]
Documentation Top
Index for This Book

Storing Jar Files in a Database Class Loading

dbclasses, or COM.cloudscape.tools.dbclasses, is a utility that allows you to store jar files in a database.

You can use the utility within an SQL-J statement or on the command line. When used within an SQL-J statement, the utility stores jar files in the database of the current connection. When you use it on the command line, you specify the database connection URL of the database in which to store the jar files.

Working with the Utility

Your jar file has a physical name (the name you gave it when you created it) and a Cloudscape name (the Cloudscape identifier you give it when you load it into a particular schema). Its Cloudscape name is an SQL92Identifier; it can be delimited and must be unique within a schema. A single schema can store more than one jar file.

The syntax for the command-line utility to add a jar file is:

java COM.cloudscape.tools.dbclasses add databaseConnectionURL qualifiedJarNameInCloudscape jarFilePath

The SQL-J syntax to add a jar file is:

CALL dbclasses.addJar('schema', 'jarNameInCloudscape', 'jarFilePath')

The syntax for the command-line utility to remove a jar file is:

java COM.cloudscape.tools.dbclasses remove databaseConnectionURL qualifiedJarNameInCloudscape

The SQL-J syntax to remove a jar file is:

CALL dbclasses.removeJar ('schema', 'jarNameInCloudscape')

The syntax for the command-line utility to replace a jar file is:

java COM.cloudscape.tools.dbclasses replace databaseConnectionURL qualifiedJarNameInCloudscape jarFilePath

The SQL-J syntax to replace a jar file is:

CALL dbclasses replaceJar('schema', 'jarNameInCloudscape', 'jarFilePath')
  • databaseConnectionURL
    A database connection URL to connect to the database. Add any attributes necessary, such as user name and password. An example:

    jdbc:cloudscape:toursDB;user=guest;password=cloudscape

  • jarFilePath
    The path and physical name of the jar file to add or use as a replacement. An example:

    d:/todays_build/tours.jar

  • qualifiedJarNameInCloudscape
    The Cloudscape name of the jar file, qualified by the schema name if it is not APP. Two examples:

    APP.ToursLogic

    -- a delimited identifier. On the command-line you need to
    -- escape the double quotes
    APP.\"ToursLogic!\"

  • schema
    The schema name.
  • jarNameInCloudscape
    The Cloudscape name of the jar file to add, remove, or update. Two examples:

    ToursLogic

    "ToursLogic!"

Complete Examples

  • Complete SQL-J example for adding a jar:

    CALL dbclasses.addJar('APP', '"ToursLogic!"', 'd:/todays_build/ tours.jar')

  • Complete command-line example for adding a jar:

    java COM.cloudscape.tools.dbclasses add jdbc:cloudscape:toursDB APP.\"ToursLogic!\" d:/todays_build/tours.jar

For more information about storing classes in a database, see the Cloudscape Developer’s Guide.

[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.