org.jboss.cache.loader
Class C3p0ConnectionFactory
java.lang.Object
org.jboss.cache.loader.C3p0ConnectionFactory
- All Implemented Interfaces:
- ConnectionFactory
public class C3p0ConnectionFactory
- extends java.lang.Object
Standalone connection factory based on c3p0 connection pooling library
- Author:
- Galder Zamarreno
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
C3p0ConnectionFactory
public C3p0ConnectionFactory()
setConfig
public void setConfig(AdjListJDBCCacheLoaderConfig config)
- Specified by:
setConfig
in interface ConnectionFactory
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface ConnectionFactory
- Throws:
java.lang.Exception
checkoutConnection
public java.sql.Connection checkoutConnection()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
stop
public void stop()
- Specified by:
stop
in interface ConnectionFactory
getDataSource
protected javax.sql.DataSource getDataSource()
prepare
public void prepare(java.lang.Object tx)
- Specified by:
prepare
in interface ConnectionFactory
getConnection
public java.sql.Connection getConnection()
- Specified by:
getConnection
in interface ConnectionFactory
commit
public void commit(java.lang.Object tx)
- Specified by:
commit
in interface ConnectionFactory
rollback
public void rollback(java.lang.Object tx)
- Specified by:
rollback
in interface ConnectionFactory
close
public void close(java.sql.Connection con)
- Specified by:
close
in interface ConnectionFactory
getUrl
public java.lang.String getUrl()
getUsr
public java.lang.String getUsr()
getPwd
public java.lang.String getPwd()
getDriverClass
public java.lang.String getDriverClass()
loadDriver
protected void loadDriver(java.lang.String drv)