commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wm.A.Stafford" <staff...@marine.rutgers.edu>
Subject Re: DBCP - Where does logAbandoned log?
Date Fri, 19 Oct 2007 13:06:15 GMT
Filip,
    Thanks for the reply.  Here is my code:
      
          BasicDataSource ds = new BasicDataSource();
          ds.setDriverClassName(bundle.getString("Driver"));
          ds.setUsername(bundle.getString("UserStr"));
          ds.setPassword(bundle.getString("PwdStr"));
          ds.setUrl( bundle.getString("URLStr"));
          ds.setRemoveAbandoned(true);
          ds.setRemoveAbandonedTimeout(30);
          ds.setLogAbandoned(true);

    When I start the app I do see a message on sysout indicating the 
abandoned settings:
AbandonedObjectPool is used 
(org.apache.commons.dbcp.AbandonedObjectPool@987a33)
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 30
Date set:Sat Oct 20 00:00:00 EDT 2007

    But, as I said earlier, I don't see any other logging when the app 
is running or subsequently shut down.

    -=bill


Filip Hanik - Dev Lists wrote:
> you must also set
>
> *removeAbandoned*="true"
>
> Filip
>
> Wm.A.Stafford wrote:
>> I am trying to track down a connection leak in a Tomcat app that uses 
>> dbcp.  I was hoping that logging abandoned connections would give 
>> some clue as to where the leak is occurring.  I set logAbandoned to 
>> be true and removeAbandonedTimeout to 30. I  added Connection c = 
>> getConnection() with no c.close() to a servlet.  I was expecting to 
>> see some sort of logging whenever this servlet handled a request but 
>> I have seen nothing in any of the usual logs.  Where do the stack 
>> traces get logged?  Is my test case sufficient to cause logging?  I 
>> am using dbcp1.2.2.
>>
>> Thanks,
>> -=bill
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message