avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: LogKit: Proposal to allow better Error Handling when using JMS and JDBC.
Date Tue, 23 Apr 2002 08:38:53 GMT
On Mon, 22 Apr 2002 17:34, david.gray@hic.gov.au wrote:
...snip good explanation of problem and solution...
>
> public AbstractTarget(final ErrorHandler errorHandler) {
>       if (errorHandler != null) {
>             m_errorHandler = errorHandler;
>       }
> }

Only thing I would change is the above so that it looks like

if( null == errorHandler )
{
  throw new NullPointerException( "errorHandler" );
}

as it looks like a bug to me to pass in null handler.

> Any comments on the design?

+1

Awaiting the patch ;)

> ANOTHER POSSIBLE CHANGE
> =======================
>
> The next change I see is that I would also like to add this facility into
> excalibur.logger.factory classes. This could take the form of the XML
> specifying the name of the class that implements the ErrorHandler and then
> using a class loader to instantiate the class. I have previously used the
> Class.forName method in combination with the instanceOf operation to do
> this but that uses the default classLoader. ClassLoaders are not something
> that I know that much about just enough to get by.
>
> Any comments on this proposal?

Sounds good to me !

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message