org.objectweb.telosys.dal.sql
Class SqlConnectionPool

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysObject
      extended byorg.objectweb.telosys.dal.sql.SqlConnectionProvider
          extended byorg.objectweb.telosys.dal.sql.SqlConnectionPool
All Implemented Interfaces:
ConnectionProvider

public class SqlConnectionPool
extends SqlConnectionProvider


Field Summary
 
Fields inherited from interface org.objectweb.telosys.dal.sql.ConnectionProvider
DATASOURCE, FACTORY, NO_PROVIDER, POOL
 
Constructor Summary
SqlConnectionPool(java.lang.String sName, java.lang.String sDriver, java.lang.String sUrl, java.util.Properties prop, int iIsolationLevel, int iSize)
           
 
Method Summary
protected  void finalize()
           
 SqlConnection findConnection()
           
 java.sql.Connection getConnection()
          Returns a standard JDBC Connection
 int getCurrentSize()
           
 int getFreeConnections()
           
 int getInitialSize()
           
 int getType()
          Returns the type of ConnectionProvider : FACTORY, POOL, DATASOURCE
 int getUsedConnections()
           
 boolean isPool()
           
 
Methods inherited from class org.objectweb.telosys.dal.sql.SqlConnectionProvider
createStandardJdbcConnection, getName
 
Methods inherited from class org.objectweb.telosys.common.TelosysObject
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlConnectionPool

public SqlConnectionPool(java.lang.String sName,
                         java.lang.String sDriver,
                         java.lang.String sUrl,
                         java.util.Properties prop,
                         int iIsolationLevel,
                         int iSize)
Method Detail

isPool

public boolean isPool()
Specified by:
isPool in class SqlConnectionProvider

finalize

protected void finalize()

getFreeConnections

public int getFreeConnections()

getUsedConnections

public int getUsedConnections()

getInitialSize

public int getInitialSize()

getCurrentSize

public int getCurrentSize()

getConnection

public java.sql.Connection getConnection()
                                  throws java.lang.Exception
Description copied from interface: ConnectionProvider
Returns a standard JDBC Connection

Specified by:
getConnection in interface ConnectionProvider
Specified by:
getConnection in class SqlConnectionProvider
Throws:
java.lang.Exception

findConnection

public SqlConnection findConnection()
                             throws java.lang.Exception
Throws:
java.lang.Exception

getType

public int getType()
Description copied from interface: ConnectionProvider
Returns the type of ConnectionProvider : FACTORY, POOL, DATASOURCE

Returns: