|
This document describes
several aspects of working with the PointBase server and Sun Java
System Web Server. For database-related information, please
refer to PointBase documentation.
Installing
and Configuring the JDBC Driver
To install and configure
PointBase for use with the sample applications, follow these steps:
- Download and install
PointBase server and client products.
Download the PointBase
evaluation software from http://www.pointbase.com/.
Install at least
the PointBase Server and Client products on your system. The
PointBase Client product includes the PointBase Type 4 JDBC
driver.
- Add PointBase Type
4 JDBC Driver to the Web Server's Classpath.
You can find the JDBC
driver under pointbase_install_dir/lib/.
The driver is named pbclientnn.jar
where nn represents the version of PointBase.
a. Log on to the Administration
GUI.
b. Click the Configurations
tab.
c. Select the correct
config.
d. Click the Java tab.
e. Click the Path Settings
tab.
f. Append the PointBase
jdbc jar path to
Classpath Suffix field.
g. Click Save.
h. Click Deploy.
Starting
PointBase
The database server can
be easily started by performing one of the following actions. See
the PointBase server documentation for more detailed information
about starting and stopping the server.
On Windows platforms:
pointbase_install_dir/tools/server/startserver.bat
On UNIX platforms:
pointbase_install_dir/tools/server/startserver.sh
After
starting the PointBase console, select DBA -> Create New Database.
While creating the database, you can use the existing PointBase
user PBPUBLIC, or you can use the existing user.
Executing
SQL Statements With PointBase
You can use the PointBase
console GUI to execute SQL statements found in the .sql files within
the src/sql/ directory of each JDBC-relevant sample.
To start the console,
do the following:
On Windows platforms:
pointbase_install_dir\tools\server\startconsole.bat
On UNIX platforms:
pointbase_install_dir/tools/server/startconsole.sh
To connect to the database,
select DBA -> Connect to Database.
Enter the following information
for the samples database installed with the web server:
- Driver - Use the default
value as provided
- URL - jdbc:pointbase://localhost/<database
name>
- User and Password
- User name and password for the database
Once connected to the
database, you can enter SQL statements in the top portion of the
window, and the results can be viewed in the lower portion. SQL
statements can be entered individually or as a sequence of statements
from a file.
If a single statement
must be executed, enter the SQL statement and select the menu option
SQL -> Execute to execute the statement.
If a sequence of statements
must be executed, use the menu option SQL -> Execute all.
To use an .sql
file, as provided with the sample applications, select File ->
Open and open the .sql
file of interest. If the .sql
file contains an exit; statement, you should remove this statement
to avoid exiting from the console when executing statements read
from the .sql file.
Review the PointBase
documentation for more information about the PointBase console.
The documentation is available at pointbase_install_dir/docs.
Registering
JDBC Resources and Defining Connection Pools
You can reveiw the sample
common.xml and build.xml files to learn how to use the ant command-line
interface (CLI) to define JDBC resources and connection pools. Also
refer to the following:
- Using Ant With the Samples
- Deploying Samples and Creating the Resources
Using Admin GUI
|