org.gcube.data.spd.obisplugin.pool
Class JDBCConnectionPool

java.lang.Object
  extended by org.gcube.data.spd.obisplugin.pool.ObjectPool<Connection>
      extended by org.gcube.data.spd.obisplugin.pool.JDBCConnectionPool

public class JDBCConnectionPool
extends ObjectPool<Connection>

Author:
"Federico De Faveri defaveri@isti.cnr.it" Adapted from http://sourcemaking.com/design_patterns/object_pool/java

Field Summary
protected  String password
           
protected  String url
           
protected  String username
           
 
Fields inherited from class org.gcube.data.spd.obisplugin.pool.ObjectPool
closed, expirationTime, locked, logger, name, unlocked
 
Constructor Summary
JDBCConnectionPool(String driver, String dsn, String usr, String pwd)
           
 
Method Summary
protected  Connection create()
           
protected  void expire(Connection o)
           
protected  boolean validate(Connection o)
           
 
Methods inherited from class org.gcube.data.spd.obisplugin.pool.ObjectPool
checkIn, checkOut, expireAllLocked, expireAllUnlocked, shutdown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

url

protected String url

username

protected String username

password

protected String password
Constructor Detail

JDBCConnectionPool

public JDBCConnectionPool(String driver,
                          String dsn,
                          String usr,
                          String pwd)
Method Detail

create

protected Connection create()
Specified by:
create in class ObjectPool<Connection>

expire

protected void expire(Connection o)
Specified by:
expire in class ObjectPool<Connection>

validate

protected boolean validate(Connection o)
Specified by:
validate in class ObjectPool<Connection>


Copyright © 2013. All Rights Reserved.