nl.idgis.giserver
Class JDBCConnectionPool

java.lang.Object
  extended by nl.idgis.giserver.JDBCConnectionPool

public final class JDBCConnectionPool
extends java.lang.Object

Connection pool for JDBC connections to data bases.

Author:
bretelerjj

Constructor Summary
JDBCConnectionPool()
           
 
Method Summary
static void freeConnection(java.sql.Connection conn)
          The freeConnection method simply returns a JDBC connection to the pool.
static java.sql.Connection getConnection(JDBC_ConnectionParams jdbc)
          reate a JDBC connection to a data base.
static java.sql.Connection getConnection(java.lang.String driverClassName, java.lang.String url, java.util.Properties props)
          Create a JDBC connection to a data base.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCConnectionPool

public JDBCConnectionPool()
Method Detail

getConnection

public static java.sql.Connection getConnection(java.lang.String driverClassName,
                                                java.lang.String url,
                                                java.util.Properties props)
Create a JDBC connection to a data base. A check is made if the requested driver needed to be install. If no connection are available in the pool a new one will be created.

Parameters:
driverClassName - the class name of the serving driver
url -
props - properties ( user and password)
Returns:
JDBC connection to the data base available for use.

freeConnection

public static void freeConnection(java.sql.Connection conn)
The freeConnection method simply returns a JDBC connection to the pool.

Parameters:
Jdbc3Connection - the used connection.

getConnection

public static java.sql.Connection getConnection(JDBC_ConnectionParams jdbc)
reate a JDBC connection to a data base. A check is made if the requested driver needed to be install. If no connection are available in the pool a new one will be created.

Parameters:
jdbc - parameters
Returns:
JDBC connection to the data base available for use.