JDBC Driver for SQL/MP 3.0

In an environment that uses an application server, deployment of an
SQLMPConnectionPoolDataSource
object requires
that both an application-visible DataSource object and the underlying SQLMPConnectionPoolDataSource object be
registered with a JNDI-based naming service.
The first step is to deploy the SQLMPConnectionPoolDataSource implementation, as is done in this code example:
com.tandem.sqlmp.SQLMPConnectionPoolDataSource cpds =
new com.tandem.sqlmp.SQLMPConnectionPoolDataSource();
cpds.setDatabaseName("booklist");
cpds.setMaxPoolSize(40);
cpds.setMaxStatements(100);
cpds.setTransactionMode("INTERNAL");
...
// Register the SQLMPConnectionPoolDataSource with JNDI,
// using the logical name "jdbc/pool/bookserver_pool"
Context ctx = new InitialContext();
ctx.bind("jdbc/pool/bookserver_pool", cpds);
After this step is complete, the SQLMPConnectionPoolDataSource implementation is available as a foundation for the
client-visible application-server DataSource implementation. The user deploys the application server DataSource
implementation such that it references the SQLMPConnectionPoolDataSource implementation, as shown:
// Three Star Server DataSource implements the DataSource
// interface. Create an instance and set properties.
com.threeStar.appserver.PooledDataSource ds =
new com.threeStar.appserver.PooledDataSource();
ds.setDescription("Datasource with connection pooling");
// Reference the registered SQLMPConnectionPoolDataSource
ds.setDataSourceName("jdbc/pool/bookserver_pool");
// Register the DataSource implementation with JNDI, by using the
// logical name "jdbc/bookserver".
Context ctx = new InitialContext();
ctx.bind("jdbc/bookserver", Ds);
For more information about connection pooling and the application server, see the JDBC 3.0 specification.
Connection Pooling in a Basic DataSource
Implementation
For your NonStop Server for Java application to enable connection pooling, use the JDBC basic DataSource interface.
The JDBC/MP driver implements the DataSource interface with a class called SQLMPDataSource.
You can use SQLMPDataSource implementation to provide:
Both connection and statement pooling
Only connection pooling
Only statement pooling
A connection with neither connection pooling nor statement pooling
The connection pooling implementation is described in these topics:
Basic DataSource Object Properties
Requesting Connection and Statement Pooling