org.xerial.db.sql
Class NaiveConnectionPool

java.lang.Object
  extended by org.xerial.db.sql.NaiveConnectionPool
All Implemented Interfaces:
ConnectionPool

public class NaiveConnectionPool
extends Object
implements ConnectionPool

NaiveConnectionPool creates a connection every time when a query is requested, then closes the connection affte its ResultSet is consumed.

Author:
leo

Constructor Summary
NaiveConnectionPool(String driver, String address)
           
 
Method Summary
 void closeAll()
           
 Connection getConnection()
           
 void returnConnection(Connection leasedConnection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NaiveConnectionPool

public NaiveConnectionPool(String driver,
                           String address)
Method Detail

closeAll

public void closeAll()
              throws DBException
Specified by:
closeAll in interface ConnectionPool
Throws:
DBException

getConnection

public Connection getConnection()
                         throws DBException
Specified by:
getConnection in interface ConnectionPool
Throws:
DBException

returnConnection

public void returnConnection(Connection leasedConnection)
Specified by:
returnConnection in interface ConnectionPool


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.