QuickServer
v1.4.7

org.quickserver.sql
Interface DBPoolUtil


public interface DBPoolUtil

This interface is used by QuickServer load all db drivers. It is also used to get Connection object by the QuickServer when it encounters <db-object-pool>...</db-object-pool> in its configuration file.

Since:
1.3
Author:
Akshathkumar Shetty

Method Summary
 boolean clean()
          This method will close all db connection pools that was set using setDatabaseConnections(java.util.Iterator)
 java.sql.Connection getConnection(java.lang.String id)
          Returns the Connection object for the DatabaseConnection that is identified by id passed.
 boolean initPool()
          This method will initilise and load all the db connection pools that was set using setDatabaseConnections(java.util.Iterator)
 void setDatabaseConnections(java.util.Iterator iterator)
          QuickServer passes the an iterator containing DatabaseConnectionConfig objects if any from the xml configuration it reads.
 

Method Detail

setDatabaseConnections

public void setDatabaseConnections(java.util.Iterator iterator)
                            throws java.lang.Exception
QuickServer passes the an iterator containing DatabaseConnectionConfig objects if any from the xml configuration it reads.

Throws:
java.lang.Exception

initPool

public boolean initPool()
This method will initilise and load all the db connection pools that was set using setDatabaseConnections(java.util.Iterator)


clean

public boolean clean()
This method will close all db connection pools that was set using setDatabaseConnections(java.util.Iterator)


getConnection

public java.sql.Connection getConnection(java.lang.String id)
                                  throws java.lang.Exception
Returns the Connection object for the DatabaseConnection that is identified by id passed. If id passed does not match with any connection loaded by this class it will return null.

Throws:
java.lang.Exception

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org