Style Intelligence v12.0

inetsoft.uql.jdbc
Interface ConnectionPool


public interface ConnectionPool

This interface defines the API of a connection pool provider. If a connection pool is supplied, all JDBC datasource uses the connection pool to obtain connections. A connection pool can be specified by passing an object implementing the connection pool to the JDBCHandler.setConnectionPool().


Method Summary
 Connection getConnection(XDataSource xds, Principal user)
          Get a connection from the connection pool.
 void releaseConnection(XDataSource xds, Connection conn)
          Release a connection back to the connection pool.
 

Method Detail

getConnection

Connection getConnection(XDataSource xds,
                         Principal user)
Get a connection from the connection pool. If there is no more connection in the pool, wait for a connection to be released.

Parameters:
xds - jdbc datasource. A connection pool can support multiple datasource by checking for the datasource name.
user - a Principal object that identifies the user for whom the connection is being retrieved.

releaseConnection

void releaseConnection(XDataSource xds,
                       Connection conn)
Release a connection back to the connection pool.

Parameters:
xds - jdbc datasource.
conn - database connection.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.