Using the Cloudscape Database with WebLogic Server
Setting Up Cloudscape for Use with WebLogic Server
Setting Up the Example "demoPool" Database
Creating a Database
Starting Cloudview
Other Resources
Cloudscape is a pure-Java relational database management system (RDBMS) that BEA ships with the WebLogic distribution to allow you to run code examples with a functional RDBMS. The WebLogic Tour and several WebLogic examples use Cloudscape as the default DBMS.
The Cloudscape full-featured evaluation copy is located in the directory /weblogic/eval/cloudscape. To check the expiration date on this evaluation copy, put cloudscape.jar into your CLASSPATH and run the
command:
java COM.cloudscape.tools.sysinfo
Note: Running Cloudview with JDK 1.1.7 or JDK 1.1.8 creates hashtable overflows after a short
period, on all platforms. This is a JVM bug and has
been resolved in JDK 1.2. Also, using JDK 1.3.0 an error is generated with the cview command.
You can update your version of Cloudscape to avoid this particular problem. See
http://www.cloudscape.com/support/TechInfo/fyi_weblogiclicense.html for more information.
The latter link shows users how to update the version of CloudScape that's packaged in their
WebLogic installation. You may also wish to update your version of Cloudscape if your Cloudscape license has expired.
Setting Up Cloudscape for Use with WebLogic Server
-
Add the Cloudscape libraries to the server's CLASSPATH using the -classpath option on the command
line. See Setting classpath for more information on
setting your CLASSPATH.
-
Additional JAR files are included with the distribution. If you want to use other Cloudspace utilities, such as the Cloudview editor, add the appropriate JAR file.
NOTE: The evaluation version of Coudscape that ships with WebLogic Server supports only one database connection at a time to a cloudscape.system.home directory.
- Some examples require that you set up a WebLogic JDBC connection pool that uses the Cloudscape JDBC driver.
The weblogic.properties file
has a sample entry for a JDBC connection pool using Cloudscape, which
you can uncomment: weblogic.jdbc.connectionPool.demoPool=\
url=jdbc:cloudscape:demo,\
driver=COM.cloudscape.core.JDBCDriver,\
initialCapacity=2,\
maxCapacity=6,\
capacityIncrement=1
weblogic.allow.reserve.weblogic.jdbc.connectionPool.demoPool=everyone
The name of the Cloudscape database in this example is demo, which
is included in the WebLogic distribution in the /weblogic/eval/cloudscape/data directory.
Setting Up the Example "demoPool" Database
Many WebLogic examples use the JDBC connection pool demoPool. To use these examples, you must uncomment the
following properties in your weblogic.properties file.
weblogic.jdbc.connectionPool.demoPool=\
url=jdbc:cloudscape:demo,\
driver=COM.cloudscape.core.JDBCDriver,\
initialCapacity=1,\
maxCapacity=2,\
capacityIncrement=1,\
props=user=none;password=none;server=none
#
# Add an ACL for the connection pool:
weblogic.allow.reserve.weblogic.jdbc.connectionPool.demoPool=everyone
Also check the following property if you installed the
WebLogic Server from the zip file distribution, and you did not install it in
the default location. This property tells the WebLogic JDBC Cloudscape driver
where to find the demoPool database.
java.system.property.cloudscape.system.home=/weblogic/eval/cloudscape/data
where /weblogic is the installation
root directory where you unzipped the WebLogic zip distribution. If you
installed using "Install Shield", this property should already be configured
correctly.
Creating a Database
To create a new database, do one of the following:
- Add the create=true property to the
URL of a connection pool, like this:
url=jdbc:cloudscape:newdb;create=true,\
This instructs Cloudscape to create the database in the cloudscape.system.home directory if
it doesn't exist.
-
You can use Cloudscape's Visual DBMS tool to create databases and
tables, and view and modify existing data.
Starting Cloudview
Cloudview is Cloudscape's graphical user interface that you use to create, view, and manage Cloudscape databases.
To start Cloudview from a command shell:
- Set your classpath to include:
/weblogic/eval/cloudscape/lib/tools.jar
/weblogic/eval/cloudscape/lib/cloudscape.jar
/weblogic/lib/weblogicaux.jar
where weblogic is the directory
where WebLogic is installed.
For example (on one command line):
$ set CLASSPATH=/weblogic/eval/cloudscape/lib/tools.jar;\
/weblogic/eval/cloudscape/lib/cloudscape.jar;\
/weblogic/lib/weblogicaux.jar
Here, we include the weblogicaux.jar
file to provide the Java Swing classes required by Cloudview. If you are
running Java1.2, Swing is automatically included, so you need not include
weblogicaux.jar. A JVM before Java1.2
requires access to the Swing classes. Cloudscape recommends that you
download a JAR file called swingall.jar from the Cloudscape Web site. However, the weblogicaux.jar already includes the Swing
classes, so that file is used here instead.
Note: Do not include the swingall.jar file in the WebLogic Server
CLASSPATH. It will clash with the Swing classes already included
in weblogicaux.jar file, and may cause
the WebLogic Console to crash.
-
To start Cloudview, enter the following command on one line:
$ java COM.cloudscape.tools.cview
-
The Cloudview GUI should start. Use the File menu to open an existing database, or create a new one.
For more details on using Cloudview, refer to their website
http://www.cloudscape.com.
Other Resources
The following links provide more information about Cloudscape:
website:
- Online Cloudscape documentation
- Cloudscape JBMS whitepaper
- Product information
- Online support
The WebLogic Tour, included with your WebLogic distribution, makes
use of the cloudscape DBMS. The tour is also available online.
![](../classdocs/images/backtop.gif)
|