If you are using a database eWay, you configure the database connection pool in the database external system in the Environment and do not need to perform this step. If the application is running on the Sun Java System Application Server and is not using a database eWay to connect to the database, you need to create and configure two JDBC connection pools and resources using the Admin Console.
To set up the connection pools, you create the connection pools and then define a JDBC resource for each pool. This section provides general instructions for setting up the connection pools. For more information about the procedures in this section, see the online help provided with the Sun Java System Application Server Admin Console.
Perform the following steps to define database connectivity through the application server:
If you are using an Oracle database, you need to manually install or copy the database driver to the application server environment. If you are using a SQL Server database, you can skip this step.
You can either install the Oracle driver on the application server or copy the ojdbc14.jar file from your Oracle client installation (Oracle_client\jdbc\lib) to app_server_home\lib. To install the driver, see the documentation for the Sun Java System Application Server.
Once the driver is installed or copied, continue to Step 2: Create the JDBC Connection Pools.
The JDBC connection pools provide connections for the master index database. Before proceeding, make sure you have the relevant information about the master index database (such as the database name, URL, and administrator login credentials).
If you are using an Oracle database, be sure to add the database driver to the application server environment, as described in Step 1: Add the Oracle Driver to the Application Server.
Log in to the Sun Java System Application Server Admin Console.
You can access the console from the Services window in NetBeans.
In the left portion of the Admin Console, expand Resources, expand JDBC, and then select Connection Pools.
On the Create Connection Pool page, click New.
In the Name field, enter a name for the connection pool.
In the Resource Type field, select the appropriate Java class.
You can use either javax.sql.DataSource or javax.sql.ConnectionPoolDataSource.
In the Database Vendor field, select the database platform of the master index database.
In the DataSource Classname field, enter the Java class for the data source, or accept the default value if it is provided.
Modify the Pool Settings properties according to your business practices.
Modify the Connection Validation properties according to your business practices.
Modify the Transaction properties if necessary.
In the additional properties section, enter the values for the master index database. Be sure to enter the following information at a minimum (you might need to create some of these properties):
URL – The URL that points to the database. The syntax of the URL is:
For Oracle, jdbc:oracle:thin:@host:port:database_name.
For SQL Server, jdbc:sqlserver://server:port;databaseName=database
user – The login ID for the user you created in Step 2: Create a Master Index Database and User (Repository).
password – The password for the above user.
ImplicitCachingEnabled – An indicator of whether implicit statement caching is enabled. Set this property to true.
MaxStatements – The maximum number of statements in the cache. Set this property to 1000.
Repeat the above steps to create a connection pool with a different name for the sequence manager.
Continue to Step 3: Create the JDBC Resources.
A JDBC resource (also known as a data source) gives the master index application the ability to connect to the database. You need to create one for each connection pool created earlier.
Create the JDBC connection pool, as described in Step 2: Create the JDBC Connection Pools.
In the left portion of the Admin Console, expand Resources, expand JDBC, and then select JDBC Resources.
On the Create JDBC Resource page, click New.
In the JNDI Name field, enter a unique name for the JDBC resource.
The name must be in the form jdbc/application_nameDataSource, where application_name is the name of the master index application. For example, jdbc/PersonDataSource.
In the Pool Name field, enter the name of the first JDBC connection pool you created in Step 2: Create the JDBC Connection Pools.
(Optional) In the Description field, enter a brief description of the resource.
In the Status field, select the Enabled check box.
Repeat the above steps to create another JDBC resource for the sequence manager using these guidelines:
For the connection pool, select the second connection pool you created in Step 2: Create the JDBC Connection Pools.
The name of the resource must be in the form jdbc/application_nameSequenceDataSource, where application_name is the name of the master index application. For example, jdbc/PersonSequenceDataSource.