3

I am creating a database connection pool with following properties.

<bean id="complianceCCRDataSource" class="org.apache.commons.dbcp.BasicDataSource" 
        destroy-method="close" lazy-init="false" >

    <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver" /> 
    <property name="username" value="${deshaw.compliance.ccr.db.username}" />
    <property name="password" value="${deshaw.compliance.ccr.db.password}" />
    <property name="url" value="${deshaw.compliance.ccr.db.url}" />
    <property name="initialSize" value="5" />
    <property name="maxActive" value="10" />
    <property name="maxWait" value="60000"/>
    <property name="testOnBorrow" value="true" /> 
    <property name="validationQuery"> 
        <value>use ${deshaw.compliance.ccr.db.name} SELECT 1 
        </value> 
    </property>
    <property name="maxIdle" value="10" />
    <property name="removeAbandoned" value="true" />
    <property name="removeAbandonedTimeout" value="600" />
    <property name="logAbandoned" value="false" />
</bean>

When I try to instantiate the above bean, I am getting following messages on STDOUT. Is there any way I can suppress these ?

   AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@2d82ef6b)
   LogAbandoned: false
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 600
skaffman
  • 398,947
  • 96
  • 818
  • 769

1 Answers1

0

You should use the setLogWriter() (see javadoc here) method as described in this JIRA.

abalogh
  • 8,239
  • 2
  • 34
  • 49