org.edg.security.voms.database.connection
Class QueryPool

java.lang.Object
  |
  +--org.edg.security.voms.database.connection.ConnectionPool
        |
        +--org.edg.security.voms.database.connection.QueryPool

public class QueryPool
extends ConnectionPool

Connection pool for database queries. TODO: replace this hack with JNDI/JDBC-based real connection pools.

Version:
$Name: v0_7_0 $
Author:
Karoly Lorentey

Field Summary
private static org.apache.log4j.Logger log
          Logger.
private  int nextid
           
private static QueryPool pool
          Holds all query pools ever created.
 
Fields inherited from class org.edg.security.voms.database.connection.ConnectionPool
maxConn, name
 
Constructor Summary
private QueryPool()
           
 
Method Summary
protected  ConnectionWrapper createConn()
          Create a brand new connection.
static QueryPool getInstance()
           
 java.lang.String toString()
           
 
Methods inherited from class org.edg.security.voms.database.connection.ConnectionPool
closeAll, connect, get, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final transient org.apache.log4j.Logger log
Logger.


pool

private static QueryPool pool
Holds all query pools ever created.


nextid

private int nextid
Constructor Detail

QueryPool

private QueryPool()
           throws GeneralDatabaseException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class ConnectionPool

getInstance

public static QueryPool getInstance()
                             throws GeneralDatabaseException,
                                    ArgumentException
GeneralDatabaseException
ArgumentException

createConn

protected ConnectionWrapper createConn()
                                throws GeneralDatabaseException
Description copied from class: ConnectionPool
Create a brand new connection. This should be extended in subclasses to set suitable extra connection parameters. Subclasses should also check the functionality of the newly created connection by calling its isFunctional() method.

Specified by:
createConn in class ConnectionPool
GeneralDatabaseException