# Samples server database notes

JRun 4 ships with a restricted version of the PointBase Server DBMS, which is used in support of JRun sample applications. PointBase is installed into the jrun_root/pointbase directory, including documentation and other instructions on using both PointBase Server and PointBase Embedded. The version of PointBase that ships with JRun is intended for use with the samples server only and the size of each database is limited to 5MB. For complete information on PointBase, go to http://www.pointbase.com

The following table lists the PointBase databases and JRun data sources used by the samples JRun server:

Database | JRun data source | Usage
--- | --- | ---
sample | samples | Programming techniques. Uses port 9192 by default.
compass | compass | Compass travel sample application. Uses port 9292 by default.
smarticket | smarticket | Smart Ticket J2ME blueprints application. Uses port 9392 by default.
worldmusic | worldmusic | WorldMusic application. Note that this application uses native JDBC access. Uses port 9692 by default.

JRun also includes the jms_private database, which illustrates how to use a DBMS as the data store for the JRun default JMS provider.

### Starting the databases

The databases run using PointBase Server, each in its own JVM. (The samples JRun server does not use the PointBase Embedded version.) You can start the databases either automatically or manually, as follows:

- Automatically - The samples JRun server uses the PointBaseStarter service, a custom JRun service, to automatically start databases when the samples server starts. The PointBaseStarter service is defined in the jrun.xml file. This service is itself a sample application and you can view the source code in the samples/pointbase-service directory.
- Manually - The jrun_root/pointbase directory has batch files (Windows) and shell scripts (UNIX) for starting each of the databases individually. Use these files to start the databases when the samples server is not running or if the PointBaseStarter service doesn't work on your system.

### Administering the databases

Once the databases are started, you can administer them through the PointBase Console, which you start using the console.bat batch file (Windows) or the console shell script (UNIX). The jrun_root/pointbase/docs directory contains documentation that explains how to use the PointBase Console. JRun also ships the commander.bat batch file (Windows) and the commander shell script for administering PointBase in text-only mode.

### Troubleshooting

- Socket exceptions - If the samples server is running and you attempt to start a database using a batch file or shell script, you will get a BindException, indicating that the port is already in use. If you encounter problems starting the databases with the PointBaseStarter service, comment out the service in the jrun.xml file and start the databases individually using the batch file/shell scripts in the jrun_root/pointbase directory.
- Data source exceptions when starting the samples server - If the compass, sample, and travelnet databases are not started successfully by the PointBaseStarter service, JRun will not be able to bind to the compass, samples, and travelnet data sources and will display errors in the samples-event.log file.

Copyright 2002 Macromedia, Inc.
All rights reserved. Macromedia, the Macromedia
logo and JRun are trademarks or registered
trademarks of Macromedia, Inc.