| Using the Cloudscape database with WebLogic
Setting up Cloudscape for use with the WebLogic Server
Setting up the example "demoPool" database
Creating a database
Using Cloudview
Other resourcesOverviewCloudscape is a pure-Java relational database management system
(RDBMS) that is shipped with the WebLogic distribution to allow you to
run code examples with a functional RDBMS. The WebLogic Tour and
several WebLogic examples use Cloudscape for their default DBMS. WebLogic Server version 4.5.2 and higherAn evaluation copy of Cloudscape version 3.0.1 is included in your
WebLogic Server 4.5.2 distribution in the directory /weblogic/eval/cloudscape.
 
This full-featured evaluation copy of Cloudscape has a license that
will expire. To check the expiration date, put cloudscape.jar into your CLASSPATH and run the
command:
 java COM.cloudscape.tools.sysinfo WebLogic Server 4.5.1An evaluation copy of Cloudscape version 2.0.1 is included in your
WebLogic Server 4.5.1 distribution in directory /weblogic/eval/cloudscape.
This evaluation version will not expire, but it is restricted to store
only a limited amount of data.Additional InformationFor more about Cloudscape, check out their white papers and product information. 
 See Other resources for more documentation on Cloudscape,
or to purchase a licensed version.
   
 
 Setting up Cloudscape for use with the WebLogic Server
Add the Cloudscape libraries to the server's CLASSPATH . 
To access Cloudscape from the WebLogic Server, you must add the following JAR 
file to your WebLogic Server CLASSPATH:
    /weblogic/eval/cloudscape/lib/cloudscape.jarwhere weblogic is the directory 
where WebLogic is installed. Note: You should add
the Cloudscape classes by using the
-classpath option on the command
line. Do not specify any classes for Cloudscape with the weblogic.class.path property. See Setting classpath for more information on
setting your CLASSPATH.
  There are other JAR files included in the distribution that you must use
if you wish to use other Cloudscape utilities, such as the Cloudview editor.
 
Set the cloudscape.system.home Java
system property. 
Cloudscape uses the Java system property cloudscape.system.home to locate the directory that
contains its control files and database data. You can set this
directory to anywhere you choose, but the WebLogic examples use the directory /weblogic/eval/cloudscape/data. 
  You can use one of two ways to set the cloudscape.system.home property:
 
 
Add -Dcloudscape.system.home=path to the java
command line you use to start the WebLogic Server.
Or, add the property java.system.property.cloudscape.system.home=path
to the weblogic.properties
file. This property is included in the default weblogic.properties file. 
 
Note: The evaluation version of Cloudscape shipped with WebLogic 
only supports one database connection to a cloudscape.system.home directory at a time.
 
Some examples require that you set up a WebLogic JDBC connection pool using 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
       props=user=none;password=none;server=none
  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 of the 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/datawhere /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 databaseIf you want to create a new database, you can either:
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, or view and change the data in them. For more information see
Using Cloudview below. 
    
 Using CloudviewTo start Cloudview from a command shell:
 
 Set your classpath to include:
where weblogic is the directory 
where WebLogic is installed.
For example (on one command line):  /weblogic/eval/cloudscape/lib/tools.jar  /weblogic/eval/cloudscape/lib/cloudscape.jar  /weblogic/lib/weblogicaux.jar $ set CLASSPATH=/weblogic/eval/cloudscape/lib/tools.jar;\
  /weblogic/eval/cloudscape/lib/cloudscape.jar;\
  /weblogic/lib/weblogicaux.jarHere, we include the weblogicaux.jar
file to provide the Java Swing classes required by Cloudview. If you are
running with Java1.2 Swing is automatically included, so you need not include
weblogicaux.jar. A JVM before Java1.2
will require access to the Swing classes. Cloudscape recommend that you
download a JAR file called swingall.jar from the Cloudscape website. However, the weblogicaux.jar already includes the Swing
classes, so is used here instead. Note: Do not include the swingall.jar file in the WebLogic Server's 
CLASSPATH. It will clash with the Swing classes already included 
in weblogicaux.jar file, and may cause 
the WebLogic Console to crash. 
Use this command (to be entered on one line) to start Cloudview:
 $ java -Dcloudscape.system.home=weblogic/eval/cloudscape/data 
      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 resourcesFor more information about Cloudscape, try these links to their
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. 
 
 |