You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Pramodh Peddi <pp...@IMPRIVATA.com> on 2005/06/25 00:07:54 UTC

[DBCP] removeAbandoned and removeAbandonedTimeout feature

All,

 

The feature (provided by removeAbandoned and removeAbandonedTimeout)
used to work when I used Tomcat's JNDI to create the DataSource. Now, I
started using BasicDataSourceFactory.createDataSource(Properties) to
create the DataSource. Ever since I made this change, this feature
stopped working for me. One more difference is, the application is not
in the context of Tomcat now, it's a standalone application. Not sure if
this makes a difference as the tool is claimed to work both in and out
of Tomcat.

 

I realize this feature is deprecated in 1.2 and might be removed in the
future releases. I am not really sure why this feature is deprecated as
I (and hoping others) found this a very very very useful feature. Even
official dbcp documentation
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
s-howto.html) advices to use this to close poorly managed connections.
Is there any replacement for this set of parameters? If this feature is
gone (and if nothing replaces this), I do not think there is any way for
the dbcp tool to close an open connection, if not closed by the
program/application.

 

Any input will be greatly appreciated,

 

Thanks,

 

Pramodh.


Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Posted by Dirk Verbeeck <di...@pandora.be>.
Please post a junit test showing the problem with the "abandoned" 
feature and the factory.

FYI: Tomcat calls BasicDataSourceFactory.getObjectInstance(...) and this 
method calls BasicDataSourceFactory.createDataSource(...) so there isn't 
a large difference in initialization code.

The reason why abandoned* methods are deprecated are explained in the 
wiki: http://wiki.apache.org/jakarta-commons/DBCP

-- Dirk

Pramodh Peddi wrote:
> All,
> 
>  
> 
> The feature (provided by removeAbandoned and removeAbandonedTimeout)
> used to work when I used Tomcat's JNDI to create the DataSource. Now, I
> started using BasicDataSourceFactory.createDataSource(Properties) to
> create the DataSource. Ever since I made this change, this feature
> stopped working for me. One more difference is, the application is not
> in the context of Tomcat now, it's a standalone application. Not sure if
> this makes a difference as the tool is claimed to work both in and out
> of Tomcat.
> 
>  
> 
> I realize this feature is deprecated in 1.2 and might be removed in the
> future releases. I am not really sure why this feature is deprecated as
> I (and hoping others) found this a very very very useful feature. Even
> official dbcp documentation
> (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
> s-howto.html) advices to use this to close poorly managed connections.
> Is there any replacement for this set of parameters? If this feature is
> gone (and if nothing replaces this), I do not think there is any way for
> the dbcp tool to close an open connection, if not closed by the
> program/application.
> 
>  
> 
> Any input will be greatly appreciated,
> 
>  
> 
> Thanks,
> 
>  
> 
> Pramodh.
> 
> 



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