org.jboss.cache.loader
Class C3p0ConnectionFactory

java.lang.Object
  extended by org.jboss.cache.loader.C3p0ConnectionFactory
All Implemented Interfaces:
ConnectionFactory

public class C3p0ConnectionFactory
extends Object

Standalone connection factory based on c3p0 connection pooling library

Author:
Galder Zamarreno

Constructor Summary
C3p0ConnectionFactory()
           
 
Method Summary
 Connection checkoutConnection()
           
 void close(Connection con)
           
 void commit(Object tx)
           
 Connection getConnection()
           
protected  DataSource getDataSource()
           
 String getDriverClass()
           
 String getPwd()
           
 String getUrl()
           
 String getUsr()
           
protected  void loadDriver(String drv)
           
 void prepare(Object tx)
           
 void rollback(Object tx)
           
 void setConfig(AdjListJDBCCacheLoaderConfig config)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

C3p0ConnectionFactory

public C3p0ConnectionFactory()
Method Detail

setConfig

public void setConfig(AdjListJDBCCacheLoaderConfig config)
Specified by:
setConfig in interface ConnectionFactory

start

public void start()
           throws Exception
Specified by:
start in interface ConnectionFactory
Throws:
Exception

checkoutConnection

public Connection checkoutConnection()
                              throws SQLException
Throws:
SQLException

stop

public void stop()
Specified by:
stop in interface ConnectionFactory

getDataSource

protected DataSource getDataSource()

prepare

public void prepare(Object tx)
Specified by:
prepare in interface ConnectionFactory

getConnection

public Connection getConnection()
Specified by:
getConnection in interface ConnectionFactory

commit

public void commit(Object tx)
Specified by:
commit in interface ConnectionFactory

rollback

public void rollback(Object tx)
Specified by:
rollback in interface ConnectionFactory

close

public void close(Connection con)
Specified by:
close in interface ConnectionFactory

getUrl

public String getUrl()

getUsr

public String getUsr()

getPwd

public String getPwd()

getDriverClass

public String getDriverClass()

loadDriver

protected void loadDriver(String drv)


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.