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

The standard connection pool This class is a "ConnectionProvider"


Field Summary
 
Fields inherited from interface org.objectweb.telosys.dal.sql.ConnectionProvider
CUSTOMCLASS, 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)
          Constructor
 
Method Summary
protected  void finalize()
           
 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, CUSTOMCLASS
 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)
Constructor

Parameters:
sName - the connection provider name
sDriver - the JDBC driver to use
sUrl - the JDBC URL
prop - the connection properties
iIsolationLevel - the "isolation level"
iSize - the initial size of the pool
Method Detail

isPool

public boolean isPool()

finalize

protected void finalize()

getFreeConnections

public int getFreeConnections()
Returns:
the number of free connections

getUsedConnections

public int getUsedConnections()
Returns:
the number of used connections

getInitialSize

public int getInitialSize()
Returns:
the initial size of the pool

getCurrentSize

public int getCurrentSize()
Returns:
the current size of the pool

getConnection

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

Returns:
Throws:
java.lang.Exception

getType

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

Returns: