|
|
|
|
PointBase Samples and Tutorials
|
|
How WebLogic Server Uses PointBase Server
Starting PointBase Server
Stopping PointBase Server
The Samples Database
Opening the PointBase Console
PointBase Schemas
Running a Code Example with PointBase
PointBase Licensing Restriction
*Please note the following conventions that are used throughout this document:
/ for
\ in path names.
bea_home represents the central support
directory for all BEA products installed on one machine; for example, c:\bea.
WL_HOME represents the top-level installation directory for the entire WebLogic Platform.
The default path is c:\bea\weblogic700, however, you are not required to install this directory
under bea_home.
SAMPLES_HOME
represents the WebLogic Server Platform examples home directory at
bea_home\weblogic700\samples.
PointBase Server is a pure Java relational database management system (RDBMS) shipped with WebLogic Server. Its purpose is to allow you to run code examples with a functional database server. You can only use PointBase Server as a demonstration database with WebLogic Server documentation and examples. PointBase Server is for demonstration use only, (that is, non-production use) with WebLogic Server documentation and examples. The WebLogic Pet Store application and most of the WebLogic examples use PointBase as a database server.
PointBase Server starts automatically when you start WebLogic Server.
The PointBase Server runs in its own command window; do not close this window or the PointBase Server will shut down and you will not be able to run most of the examples on the examples Server.
If you wish to run PointBase without WebLogic Server, we have provided scripts that will start PointBase. On Windows, run:
SAMPLES_HOME/server/eval/pointbase/tools/startPointBase.cmd
On UNIX run:
SAMPLES_HOME/server/eval/pointbase/tools/startPointBase.sh
PointBase Server runs as a separate process from WebLogic Server. However, to stop PointBase you shutdown WebLogic Server; stopping WebLogic Server will also stop PointBase.
To stop PointBase Server:
Ctrl-C in the WebLogic command window.
If you install WebLogic Server with the examples, you
have a pre-built demonstration database in the
SAMPLES_HOME\server\eval\pointbase\databases directory.
If you need to build your own database, add these
commands to the startExamplesServer script in SAMPLES_HOME\server\config\examples,
customizing them for your environment:
set POINTBASE_HOME=%WL_HOME%\samples\server\eval\pointbase
java utils.Schema "jdbc:pointbase:server://localhost/demo"
com.pointbase.jdbc.jdbcUniversalDriver
-u examples -p examples -verbose examples/utils/ddl/demo.ddl
Where you see the boldface text, substitute the pathname
to your database and the name of your DDL file.
For more information on using utils.Schema, see
Using the WebLogic Utilities.
The PointBase Server console has a graphical user interface that you can use
to query the demo database and view results.
To open the PointBase Console:
SAMPLES_HOME/server/eval/pointbase/tools/startPointBaseConsole.cmd.
On Unix, run SAMPLES_HOME/server/eval/pointbase/tools/startPointBaseConsole.sh. These scripts will start the PointBase
Console.
com.pointbase.jdbc.jdbcUniversalDriver
jdbc:pointbase:server://localhost/demo
examples
examples
*You can use any username/password combination to enter Pointbase; however, you will only be able to make changes if you enter the correct username/password for the schema you desire to edit.
Once the console is open, you can enter a query
and view database tables and columns.
You can do this by choosing a standard query
from the SQL menu, such as
SELECT * FROM SYSUSERS or by
entering a query in the top pane.
The console displays the matching rows in the bottom pane.
Earlier versions of WebLogic Server had separate databases for the
examples and petstore domains.
Now, with PointBase, WebLogic Server uses a single database with different schemas.
PointBase uses schemas to support multiple database connections. Schemas operate much the same way as multiple databases, and they are completely separate entities within the database they share. A schema can contain tables that have the same names as tables in other schemas. Users can be set up to have rights and permissions to specific schemas and not to other schemas.
Schemas fullfills the roles of multiple databases, with the added convenience of simplified administration. For more information, check the PointBase documentation.
WebLogic Server 7.0 uses one schema for the examples
domain and another three for the petstore domains. The correct username and password will allow you to make changes to
the respective schema. To edit a schema, open your PointBase console and pull down the DBA menu and select 'Connect to a database.'
Then fill in the username and password; the username and password for each schema is its name.
The schemas names are:
examples
petstore
petstoreopc
petstoresupplier
To view or edit any schema:
This section describes how to run the
jdbc.datasource.simplesql example using
PointBase Server and the demo database.
SAMPLES_HOME\server\src\examples\jdbc\datasource\simplesql.java :
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
cd SAMPLES_HOME\samples\server\config\examples
startExamplesServer
http://localhost:7001/console
examples-dataSource-demoPool.
The data source should have these attributes:
examples-dataSource-demoPool
demoPool
examplesServer
jdbc:pointbase:server://localhost/demo
com.pointbase.jdbc.jdbcUniversalDriver
user=examples
examplesServer
cd SAMPLES_HOME\server\config\examples
setExamplesEnv
ant
ant run
You should see output similar to this:
C:\java examples.jdbc.datasource.simplesql Making connection... Table empdemo doesn't need to be dropped. Table empdemo created. Number of rows inserted = 1 Number of rows deleted = 1
Pointbase Server is an all-Java DBMS product included in the WebLogic Server distribution solely in support of WebLogic Server evaluation, either in the form of custom trial applications or through packaged sample applications provided with WebLogic Server. Non-evaluation development and/or production use of the Pointbase Server requires a separate license be obtained by the end user directly from Pointbase.
|
Last updated: March 2002 |
|
|
Home |
Corporate Info |
News |
Solutions |
Products |
Partners |
Services |
Events |
Download |
How to Buy
Copyright © 2002, BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
Contact BEA