org.experlog.db
Class ESConnectionPool

java.lang.Object
  extended by org.experlog.db.ESConnectionPool
All Implemented Interfaces:
ConnectionPool

public class ESConnectionPool
extends java.lang.Object
implements ConnectionPool

ESConnectionPool is a database tool object. it is used by openeas to do some specific operation on jdbc object. The main property of this object is the ESDataSourceWrapper object which is a wrapper to a DataSource.


Constructor Summary
ESConnectionPool()
          constructor of the connection pool object NO WORK is done here
 
Method Summary
 void cleanup()
           
 java.sql.Connection connectDb(java.lang.String datasourcename)
          load the JDBC driver by a class forName method.
 ESDataSourceWrapper getDataSource()
           
 java.util.Hashtable getPool()
           
 int getQryattempts()
           
 java.util.Hashtable getUsedPool()
           
 boolean isNew()
           
 boolean isReconnect_on_err()
           
 void removeLockedObject(org.enhydra.jdbc.pool.GenerationObject obj)
           
 void removeUnlockedObject(org.enhydra.jdbc.pool.GenerationObject obj)
           
 void setNew(boolean newb)
           
 void setQryattempts(int qryattempts)
           
 void setReconnect_on_err(boolean reconnect)
           
 void setShopConfig(Configuration shopConfig, java.lang.String name)
          set the configuration of the shop, and before the call of this method.
 void updateDB(java.sql.Connection con, java.lang.String sql)
          Update the store's database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.experlog.util.ConnectionPool
toString
 

Constructor Detail

ESConnectionPool

public ESConnectionPool()
constructor of the connection pool object NO WORK is done here

Method Detail

setShopConfig

public void setShopConfig(Configuration shopConfig,
                          java.lang.String name)
                   throws java.lang.Exception
set the configuration of the shop, and before the call of this method.

Specified by:
setShopConfig in interface ConnectionPool
Throws:
java.lang.Exception

connectDb

public java.sql.Connection connectDb(java.lang.String datasourcename)
                              throws java.lang.Exception
load the JDBC driver by a class forName method. and return a connection

Specified by:
connectDb in interface ConnectionPool
Throws:
java.lang.Exception

updateDB

public void updateDB(java.sql.Connection con,
                     java.lang.String sql)
              throws java.sql.SQLException
Update the store's database

Specified by:
updateDB in interface ConnectionPool
Throws:
java.sql.SQLException

getQryattempts

public int getQryattempts()

isReconnect_on_err

public boolean isReconnect_on_err()

isNew

public boolean isNew()

getDataSource

public ESDataSourceWrapper getDataSource()

setQryattempts

public void setQryattempts(int qryattempts)

setReconnect_on_err

public void setReconnect_on_err(boolean reconnect)
Specified by:
setReconnect_on_err in interface ConnectionPool

setNew

public void setNew(boolean newb)

cleanup

public void cleanup()

getPool

public java.util.Hashtable getPool()
Specified by:
getPool in interface ConnectionPool

removeUnlockedObject

public void removeUnlockedObject(org.enhydra.jdbc.pool.GenerationObject obj)
Specified by:
removeUnlockedObject in interface ConnectionPool

getUsedPool

public java.util.Hashtable getUsedPool()
Specified by:
getUsedPool in interface ConnectionPool

removeLockedObject

public void removeLockedObject(org.enhydra.jdbc.pool.GenerationObject obj)
Specified by:
removeLockedObject in interface ConnectionPool