net.toften.jlips.persist.db
Class DBPooledConnection

java.lang.Object
  extended by net.toften.jlips.persist.db.DBAbstractConnection
      extended by net.toften.jlips.persist.db.DBPooledConnection
All Implemented Interfaces:
DataSource, DBConnectionHandler

public class DBPooledConnection
extends DBAbstractConnection
implements DBConnectionHandler

This connection handler implements a pool of connections that can be shared by all parts of jLips

Version:
$Revision: 1.5 $
Author:
thomas

Field Summary
 
Fields inherited from class net.toften.jlips.persist.db.DBAbstractConnection
connectionProperties
 
Constructor Summary
DBPooledConnection()
           
 
Method Summary
 Connection getConnection()
          Will return a connection from the pool of connections
 void releaseConnection(Connection theConnection)
          When jLips is done with a connection it will call this method to allow the connection handler to properly dispose of the connection
 
Methods inherited from class net.toften.jlips.persist.db.DBAbstractConnection
getConnection, getConnectionProperties, getLoginTimeout, getLogWriter, setConnectionProperties, setLoginTimeout, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.toften.jlips.persist.db.DBConnectionHandler
getConnectionProperties, setConnectionProperties
 
Methods inherited from interface javax.sql.DataSource
getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

DBPooledConnection

public DBPooledConnection()
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Will return a connection from the pool of connections

Specified by:
getConnection in interface DataSource
Throws:
SQLException
See Also:
DataSource.getConnection()

releaseConnection

public void releaseConnection(Connection theConnection)
Description copied from interface: DBConnectionHandler
When jLips is done with a connection it will call this method to allow the connection handler to properly dispose of the connection

Specified by:
releaseConnection in interface DBConnectionHandler
Overrides:
releaseConnection in class DBAbstractConnection
Parameters:
theConnection - The connection to be disposed
See Also:
DBConnectionHandler.releaseConnection(Connection)