C H A P T E R  6

Customizing Your Installation

This chapter contains information to assist you in customizing your installation of Sun ONE Studio 4, Enterprise Edition for Java. It includes information about the PointBase Server 4.2 Restricted Edition and the IDE's internal UDDI Registry server.


Using Databases With the Sun ONE Studio 4 IDE

The PointBase Server 4.2 Restricted Edition is available for installation with the IDE. You can use other databases with the IDE by configuring the JDBC enabled database drivers for those databases.



Note - The following instructions assume you have already installed the PointBase Server 4.2 Restricted Edition during the IDE installation.



Using a PointBase Database

PointBase Server 4.2 Restricted Edition is the default database that is provided with the Sun ONE Studio 4 IDE installation. For information on using this database and database tables, see the PointBase documentation at either s1studio-install-directory/pointbase/server/GettingStarted.html or s1studio-install-directory/pointbase/client/GettingStarted.html.

Starting the PointBase Database Server

You have to start the PointBase database server before you can use it, whether you want to access a PointBase database from an application you developed using the IDE or you want to create your own tables or database with PointBase software.

To start the PointBase database server:

single-step bulletChoose Tools right arrow PointBase Network Server right arrow Start Server from the main window of the IDE.

The PointBase 4.2 window appears.

Stopping the PointBase Database Server

To stop the PointBase database server:

single-step bulletChoose Tools right arrow PointBase Network Server right arrow Stop Server from the main window of the IDE or choose Server right arrow Shutdown! from the PointBase 4.2 window.

Starting the PointBase Client Console

To start a PointBase console, do the following:

A "Connect to Database" dialog box appears. Click OK to continue.

single-step bulletIn a Solaris or Linux environment, type:

$ sh s1studio-install-directory/pointbase/client/Console

Stopping the PointBase Client Console

single-step bulletTo stop the client console, select File right arrow Exit from the Console menu.

Customizing Your PointBase Database

The J2EE Reference Implementation 1.3.1 is preconfigured to use the PointBase Server 4.2 Restricted Edition server included with the IDE. Starting the J2EE Reference Implementation 1.3.1 server does not start the PointBase server. You must start the PointBase Server 4.2 Restricted Edition server separately, as previously instructed in this chapter.

The J2EE Reference Implementation 1.3.1 is configured to use the default PointBase database, named "sample." If you want to create a different PointBase database, you must do the following:

  • Change the RI resource properties to point to your new database
  • Create the new database in the PointBase console

To configure the J2EE RI resource properties to point to your new database, use the $J2EE_HOME/bin/j2eeadmin tool to update the $J2EE_HOME/config/resource.properties file. The $J2EE_HOME is set to the s1studio-user-directory/j2sdkee1.3.1 directory.

The j2eeadmin syntax to create a different PointBase database is as follows:

j2eeadmin -addJdbcDatasource jndi_name url

For example, in a Solaris environment, you might type the following at the command line:

$ $J2EE_HOME/bin/j2eeadmin -addJdbcDatasource jdbc/DB1 jdbc:pointbase:server://localhost/yourdatabase

Alternatively, you can manually edit the $J2EE_HOME/config/resource.properties file and modify the jdbc.resources variable, as follows:

jdbc.DataSource.0.url=jdbc:pointbase:server://localhost/your-database

To create a new non-default data base, follow these steps:

1. Start the PointBase Server.

single-step bulletChoose Tools right arrow PointBase Network Server right arrow Start Server from the main window of the IDE.

The PointBase 4.2 window appears.

2. Start the PointBase Console.

  • In Solaris or Linux environments: Run the Console file in the s1studio-install-directory/pointbase/client directory.
  • On Microsoft Windows: Choose Start right arrow Programs right arrow Sun Microsystems right arrow Sun ONE Studio 4 EE right arrow PointBase right arrow Console or double-click the console.bat file in the s1studio-install-directory/pointbase/client directory.
The Connect To Database dialog box appears, showing values for the PointBase driver to the default sample database.

3. Change the word sample at the end of the URL field to yourdatabase

4. Set the Create New Database option and click OK.

The PointBase Console is displayed. Wait until the status message ending in "Ready" is displayed before proceeding.

Starting the PointBase Server Outside the Sun ONE Studio IDE

On Microsoft Windows 2000 and XP systems, follow these steps.

1. Type the following at a command line prompt:

cd s1studio-install-directory\pointbase\server

2. Then type:

netserver.bat "-Dpointbase.ini=s1studio-user-directory\pointbase\pointbase.ini" /win

On Microsoft Windows NT and 98 systems, follow these steps.

1. Type the following at a command line prompt:

cd s1studio-install-dir\pointbase\server

2. Then type:

netserver.bat "-Dpointbase.ini=s1studio-install-directory\pointbase\pointbase.ini" /win

On a Solaris or Linux system, follow these steps.

1. Define the environment variable PB_JAVA_OPTS to be "-Dpointbase.ini=s1studio-user-directory/pointbase/pointbase.ini" For example, type:

$ setenv PB_JAVA_OPTS "-Dpointbase.ini=s1studio-user-directory/pointbase/pointbase.ini"

2. Then go to the PointBase server directory, by typing:

$ cd s1studio-install-dir/pointbase/server

3. Start the server by typing:

$ Server /win

Using Other JDBC Enabled Databases

The following information applies to database drivers other than the driver for the PointBase Server 4.2 Restricted Edition database.

You must place database driver files in the Sun ONE Studio 4 lib/ext directory before you start the Sun ONE Studio 4 IDE. If you do not do this, the dbschema wizard does not enable you to select the proper database driver when you create a new schema. You cannot mount the driver file in the IDE's Explorer, nor can you simply place the driver file in the CLASSPATH environment variable. You must copy the driver file into the lib/ext folder.

The same database driver must also be added to the $J2EE_HOME/lib/system directory so that the application server is aware of the new database driver. Read the information contained in s1studio-install-directory/j2sdkee1.3.1/doc/release/
ConfigGuide.html#12442
for more information on required steps for adding more database drivers to the J2EE Reference Implementation 1.3.1 application server.


Configuring your IDE for Web Service Development

This section provides information about configuring your IDE for web service development. An RMI (remote method invocation) message box appears when you are deploying a web service for the first time. Web services do not require RMI enabling. If the message box appears, press No To All to automatically set the Detect Remote option to false.

To avoid getting this message, disable the RMI check on newly created files.

1. In the RMI module configuration pane, select Tools, then Options, then Distributed Application Support, and finally RMI Settings.

2. Set the Detect Remote option to false.


Using the IDE's Internal UDDI Registry Server

A single-user, internal UDDI registry is bundled with the IDE as a convenience for end-to-end testing of your development process. This registry runs in a dedicated Tomcat server, which the IDE starts and stops automatically when you start and stop the registry server.



Note - The internal UDDI registry is configured with a single user. The name is testuser and the password is testuser. Set this name and password as the default for the internal registry.



To start the internal UDDI registry server:

1. Expand the UDDI Server Registry node in the Explorer's Runtime tabbed pane.

2. Right-click the Internal UDDI Registry node and choose Start Server.

The IDE's Output window displays server startup messages. You might also see messages stating that the IDE is stopping a previous Tomcat server process.



Note - If the internal UDDI registry server is already running, the Start Server menu item is inactive.



To stop the internal UDDI registry server:

1. Expand the UDDI Server Registry node in the Explorer's Runtime tabbed pane.

2. Right-click the Internal UDDI Registry node and choose Stop Server.

Server stop messages are displayed.



Note - If the internal UDDI registry server is not running, the Stop Server menu item is inactive.