org.nuiton.wikitty.jdbc
Class WikittyManagedDataSource

java.lang.Object
  extended by org.apache.commons.dbcp.BasicDataSource
      extended by org.apache.commons.dbcp.managed.BasicManagedDataSource
          extended by org.nuiton.wikitty.jdbc.WikittyManagedDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource

public class WikittyManagedDataSource
extends org.apache.commons.dbcp.managed.BasicManagedDataSource

Extends BasicManagedDataSource to permit setWhenExhaustedAction configuration on GenericObjectPool internal field and change default action to Grow when exhausted

Version:
$Revision: 1136 $ Last update: $Date: 2011-08-12 16:24:03 +0200 (Fri, 12 Aug 2011) $ by : $Author: tchemit $
Author:
poussin

Field Summary
protected  int warnConnectionCount
          nombre de connexions actives simultanement qui affiche un message lorsqu'un message est affiche ce nombre est multiplie par 2 pour le prochain message
protected  byte whenExhaustedAction
           
 
Fields inherited from class org.apache.commons.dbcp.BasicDataSource
closed, connectionInitSqls, connectionPool, connectionProperties, dataSource, defaultAutoCommit, defaultCatalog, defaultReadOnly, defaultTransactionIsolation, driverClassLoader, driverClassName, initialSize, logWriter, maxActive, maxIdle, maxOpenPreparedStatements, maxWait, minEvictableIdleTimeMillis, minIdle, numTestsPerEvictionRun, password, poolPreparedStatements, testOnBorrow, testOnReturn, testWhileIdle, timeBetweenEvictionRunsMillis, url, username, validationQuery, validationQueryTimeout
 
Constructor Summary
WikittyManagedDataSource()
           
 
Method Summary
protected  void createConnectionPool()
           
 Connection getConnection()
           
 byte getWhenExhaustedAction()
           
 void setWhenExhaustedAction(byte whenExhaustedAction)
          Change whenExhaustedAction of connectionPool
 
Methods inherited from class org.apache.commons.dbcp.managed.BasicManagedDataSource
createConnectionFactory, createDataSourceInstance, createPoolableConnectionFactory, getTransactionManager, getTransactionRegistry, getXADataSource, getXaDataSourceInstance, setTransactionManager, setXADataSource, setXaDataSourceInstance
 
Methods inherited from class org.apache.commons.dbcp.BasicDataSource
addConnectionProperty, close, createDataSource, getConnection, getConnectionInitSqls, getDefaultAutoCommit, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDriverClassLoader, getDriverClassName, getInitialSize, getLogAbandoned, getLoginTimeout, getLogWriter, getMaxActive, getMaxIdle, getMaxOpenPreparedStatements, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getNumActive, getNumIdle, getNumTestsPerEvictionRun, getPassword, getRemoveAbandoned, getRemoveAbandonedTimeout, getTestOnBorrow, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, getUrl, getUsername, getValidationQuery, getValidationQueryTimeout, isAccessToUnderlyingConnectionAllowed, isClosed, isPoolPreparedStatements, isWrapperFor, log, removeConnectionProperty, setAccessToUnderlyingConnectionAllowed, setConnectionInitSqls, setConnectionProperties, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDriverClassLoader, setDriverClassName, setInitialSize, setLogAbandoned, setLoginTimeout, setLogWriter, setMaxActive, setMaxIdle, setMaxOpenPreparedStatements, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setNumTestsPerEvictionRun, setPassword, setPoolPreparedStatements, setRemoveAbandoned, setRemoveAbandonedTimeout, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setUrl, setUsername, setValidationQuery, setValidationQueryTimeout, unwrap, validateConnectionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

warnConnectionCount

protected int warnConnectionCount
nombre de connexions actives simultanement qui affiche un message lorsqu'un message est affiche ce nombre est multiplie par 2 pour le prochain message


whenExhaustedAction

protected byte whenExhaustedAction
Constructor Detail

WikittyManagedDataSource

public WikittyManagedDataSource()
Method Detail

getWhenExhaustedAction

public byte getWhenExhaustedAction()
Returns:
whenExhaustedAction
See Also:
GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_FAIL, GenericObjectPool.WHEN_EXHAUSTED_GROW

setWhenExhaustedAction

public void setWhenExhaustedAction(byte whenExhaustedAction)
Change whenExhaustedAction of connectionPool

Parameters:
whenExhaustedAction -
See Also:
GenericObjectPool.WHEN_EXHAUSTED_BLOCK, GenericObjectPool.WHEN_EXHAUSTED_FAIL, GenericObjectPool.WHEN_EXHAUSTED_GROW

createConnectionPool

protected void createConnectionPool()
Overrides:
createConnectionPool in class org.apache.commons.dbcp.BasicDataSource

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class org.apache.commons.dbcp.BasicDataSource
Throws:
SQLException


Copyright © 2009-2012 CodeLutin. All Rights Reserved.