Using PointBase Server
with BEA WebLogic Server™

 

Contents

  1. How WebLogic Server Uses PointBase Server
  2. Starting PointBase Server
  3. Stopping PointBase Server
  4. The Samples Database
  5. Opening the PointBase Console
  6. PointBase Schemas
  7. Running a Code Example with PointBase
  8. PointBase Licensing Restriction

See Also

  1. Samples and Tutorials

 

How WebLogic Uses PointBase Server

PointBase Server is a pure Java RDBMS, shipped with WebLogic Server, which allows 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 Medical Records application application and most of the WebLogic examples use PointBase as a database server.

 

Starting PointBase 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, run:

$WL_HOME/common/eval/pointbase/tools/startPointBase.sh

 

Stopping PointBase Server

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 type Ctrl-C in the WebLogic command window.

 

The Samples Database

If you install WebLogic Server with the examples, you have a pre-built demonstration database in...

$WL_HOME/common/eval/pointbase/databases

If you need to build your own database, add these commands to:

$SAMPLES_HOME/domains/examples/ startExamplesServer.sh
...customizing them for your environment...

set POINTBASE_HOME=$WL_HOME/common/eval/pointbase

java utils.Schema "jdbc:pointbase:server://www.setgetweb.com/demo" com.pointbase.jdbc.jdbcUniversalDriver -u examples -p examples -verbose examples/utils/ddl/demo.ddl

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.

 

Opening the PointBase Console

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:

  1. Start WebLogic Server and PointBase Server.

    $WL_HOME/common/eval/pointbase/tools/startPointBaseConsole.sh
  2. In the dialog box Connect to Database, enter these values (or make sure they are the default values):

    Driver com.pointbase.jdbc.jdbcUniversalDriver
    URL jdbc:pointbase:server://www.setgetweb.com/demo
    User examples
    Password examples

  3. Click OK. You should see the database URL in the window title bar.

*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.

 

PointBase Schemas

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 8.1 uses one schema for the examples domain and another one for the medrec domain. 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
  • medrec

To view or edit any schema:

  1. Open the PointBase Console by following the steps in Opening the PointBase Console. If you wish to edit the schema, when you get to step 6 in those instructions enter the user name and password for the schema you want to view.
  2. The "Catalog View" is contained in the left-hand panel of your PointBase Console. In the Catalog View, expand the schema you are interested in.
  3. Continue to expand the nodes to view the tables, columns, and column data types.

 

Running a Code Example with PointBase

This section describes how to run the jdbc.datasource.simplesql example using PointBase Server and the demo database.

  1. If you changed the number of the listen port (from 7001) when you installed WebLogic Server, edit...

    $SAMPLES_HOME/server/examples/src/examples/jdbc/datasource/simplesql.java
     : ...and change it in this line...
        ht.put(Context.PROVIDER_URL, "t3://www.setgetweb.com:7001");
    

  2. Open a command window.

  3. Start the examples server: cd $SAMPLES_HOME/domains/examples startExamplesServer.sh

  4. To open the Administration Console, point a browser to

    http://www.setgetweb.com:7001/console

  5. In the WebLogic Server Administration Console, go to Services > JDBC > Tx Data Sources.

  6. Look for or create a data source named examples-dataSource-demoPool. The data source should have these attributes:
    • JNDI Name: examples-dataSource-demoPool
    • Pool Name: demoPool
    • Targets-Server (on the Targets tab:) examplesServer

  7. In JDBC > Connection Pools, create or make sure a connection pool named dataSource exists and has these attributes:

  8. Open a new command window.

  9. Set the examples environment:
    • cd $SAMPLES_HOME/domains/examples
    • setExamplesEnv

  10. Compile the example: ant

  11. Run the example: ant run

    You should see output similar to this:

    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 Licensing Restriction

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.