edu.washington.cs.rfid.data.db
Class SimplePostgresConnectionPool

java.lang.Object
  extended by edu.washington.cs.rfid.data.db.SimplePostgresConnectionPool

public class SimplePostgresConnectionPool
extends java.lang.Object

A simple connection pool for connections to the database. When after getConnection is called, releaseConnection must be called when the user is done with the connection,or else the connection pool will leak

Author:
wilford

Method Summary
 SimplePostgresConnection getConnection()
          returns a SimplePostgresConnection so that a query to the database can be made
static SimplePostgresConnectionPool getInstance()
           
 void releaseConnection(SimplePostgresConnection conn)
          Return the specified connection to the connection pool.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnection

public SimplePostgresConnection getConnection()
returns a SimplePostgresConnection so that a query to the database can be made

Returns:

releaseConnection

public void releaseConnection(SimplePostgresConnection conn)
Return the specified connection to the connection pool. This MUST be called when the query the query is over, or the connection pool will leak (get it?)

Parameters:
conn -

getInstance

public static SimplePostgresConnectionPool getInstance()
Returns: