commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hussain, Arshad" <Hussa...@aetna.com>
Subject DBCP:AbandonedObjectPool how to use it please help
Date Fri, 29 Aug 2008 16:25:01 GMT


I am newbie to DBCP and want to know how to configure DCP so
AbandonedObjectPool works
 
This my  connection paramters 
 
connectionPool = new GenericObjectPool(null); 
 connectionPool.setMinIdle(2); 
  connectionPool.setMaxActive(3); 
 ConnectionFactory connectionFactory = 
                new DriverManagerConnectionFactory(connectString, 
                                                   Config.getDbUserId(),

  
Config.getDbPassword() 
                                                  ); 
  
          
        AbandonedConfig  config = new  AbandonedConfig (); 
        config.setRemoveAbandoned(true); 
        config.setRemoveAbandonedTimeout(5); 
        config.setLogAbandoned(true); 
        PoolableConnectionFactory poolableConnectionFactory = 
  new 
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,fal

se,true,config); 
        connectionPool.setFactory(poolableConnectionFactory ); 
        dataSource = new PoolingDataSource(connectionPool); 



This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message