Previous     Contents     Index     DocHome     Next     
iPlanet Application Server 6.0 Administration and Deployment Guide



Chapter 9   Administering Database Connectivity


iPlanet Application Server applications are able to access a database, or several databases, to add, retrieve, and modify data. This chapter describes how to configure data access drivers and apply settings to database connectivity parameters.

The following topics are included in this chapter:



About Data Access Drivers

iPlanet Application Server (iAS) applications often require database access. Database access is achieved through a data access driver, which is software written either by the database vendor or a third-party vendor. The following types of data access drivers can be configured with iAS to provide database connectivity:

  • Oracle

  • DB2

  • Informix

  • Sybase

  • MSSQL server (for NT)

  • ODBC

Make sure that data access drivers are installed before installing an instance of iAS. This way, iAS can automatically configure the drivers.


Configuring Data Access Drivers

When you open the Database window of iAS Administration Tool, the left pane displays all data access drivers installed on a particular server whether the drivers are configured or not. A red X appears next to drivers that are not configured.

To configure a data access driver, perform the following steps:

  1. From the iAS Administration Tool toolbar, click the Database button to open the Database window.

  2. In the left pane of the Database window, click the driver you want to configure.



  3. In the right pane of the Database window, click Load Data Access Driver.

    Information about the data access driver appears in the Database window.



  4. In the Client Library field, you can edit the library corresponding to the data access driver.

  5. In the Priority field, you can edit the priority of the data access driver.

    Giving a data access driver a priority of 1 means that driver has first priority over all other drivers. The higher the number, the lower the priority.

  6. Click Apply Changes to save your changes to iAS.

    Changes are not applied until you restart the server.



Adjusting Database Connectivity Parameters

iPlanet Application Server (iAS) allows you to adjust database connectivity through connection parameters. Connection parameters allow you to optimize the speed with which iAS connects to a database or databases. The connection parameters are grouped in the following categories:

  • connection

  • threads

  • result set buffer

  • database cache


Setting Connection Parameters

You can set the length of time iAS attempts to make a database connection. These parameters optimize the performance of the iAS machine by keeping the server from wasting resources. For example, because iAS waits for open database connections when a request is made, the connection time limit is useful to limit the server from endlessly trying to connect to a database that is down.

To set the connection parameters, perform the following steps:

  1. From the iAS Administration Tool toolbar, click the Database button to open the Database window.

  2. In the left pane of the Database window, click the database for which you want to adjust the timeout parameter.



  3. In the right pane of the Database window, in the Connection Timeout field, enter the number of seconds.



  4. Click Apply Settings to save the changes to iAS.


Setting Thread Parameters

You can set the minimum and maximum number of threads available for database connections. The thread parameters determine how many threads iAS allocates for asynchronous database queries. Such threads are usually used for queries returning a large number of rows and allowing the application to do other tasks while waiting for the query to finish. Asynchronous database queries are not supported by JDBC 2.0, a Java programming interface used to build on top on database drivers.

The default thread allocations are adequate for most applications. If an application developer uses many asynchronous queries, you might want to increase the maximum number of available threads. Keep in mind that each thread does use a small stack allocation and pulls from the total number of available system threads. Therefore, if an application does not use any asynchronous queries, you can increase performance by setting the maximum available threads to zero.

To set the thread parameters, perform the following steps:

  1. From the iAS Administration Tool toolbar, click the Database button to open the Database window.

  2. In the left pane of the Database window, select the database for which you want to adjust the asynchronous thread parameters.



  3. In the right pane of the Database window, in the Minimum Threads field, enter the number of threads.



  4. In the right pane of the Database window, in the Maximum Threads field, enter the number of threads.

  5. Click Apply Settings to save the changes to iAS.


Setting Database Cache Parameters

The database cache is an array used to hold active and recently used database connections. iAS adds database connections to cache when an application creates a database connection.

While the application is using that database connection, iAS marks that connection "in use." Once the database operations are finished, the server marks the database connection "free." The cache then holds the free connection in the cache for a configured period of time. This allows the server to use the free cached connection and quickly handle a new request to the same database. Once a free connection exceeds the timeout, a cleaning thread removes the connection from the cache and opens a slot for a new connection to be cached.

You can adjust the following cache parameters:

  • the maximum number of connections allowed in the cache

  • the number of slots held solely for free connections

  • the timeout limit, in seconds, for free connections

  • the interval, in seconds, at which the cache cleaner thread removes timed-out free connections

The default values are adequate for most applications, so adjustments are not usually required for initial application installations.

iAS dynamically adjusts the cache up to the maximum number of allowable connections. If there are no connections to cache, the array is allocated to zero spaces.

To set database cache parameters, perform the following steps:

  1. From the iAS Administration Tool toolbar, click the Database button to open the Database window.

  2. In the left pane of the Database window, select the database for which you want to adjust the database cache parameters.



  3. In the right pane of the Database window, under Cache, enter values for the following parameters:

    • Maximum Connections

    • Free Slots

    • Timeout

    • Interval



  4. Click Apply Settings to save the changes to iAS.


Previous     Contents     Index     DocHome     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated April 25, 2000