commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: [DBUtils] Proposal - logging
Date Tue, 01 Jun 2004 12:42:13 GMT

--- Petr Hollay <ph@directsite.de> wrote:
> Hello all,
> 
>  
> 
> one question to DbUtils class: methods closeQuietly() don't throw
> SQLExceptions.
> 

That's why it's called "Quietly" ;-).

>  
> 
> Would you consider to add dependency on Commons-Logging and add
> log.error()
> (or maybe warn() ) logging into catch parts of those methods?

DbUtils is a one jar distro by design and choice.  Adding an unneeded
dependency is a bad thing.

> 
>  
> 
> Idea behind is that in production environment it might be useful to be
> informed that something went wrong when closing JDBC
> Connection/Statement/ResultSet.
> 

You can use the close() methods instead if you want to be notified of
errors and log them.  The implementation of closeQuietly() isn't rocket
science; you could code them in under 5 minutes :-).  Note that DbUtils
itself never uses closeQuietly() so you will always be notified of errors
closing resources.

David

>  
> 
> I didn't find any discussion on this topic in mail archive.
> 
>  
> 
> Best regards
> 
> Petr
> 
>  
> 
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


Mime
View raw message