> -----Original Message-----
> From: Jeff Turner [mailto:[EMAIL PROTECTED]]
> Sent: den 22 november 2001 12:31
> To: Avalon Developers List
> Subject: ClassLoader rule-of-thumb? (Re: DefaultLogTargetFactoryManager)
>
>
> Hi Leo,
>
> On Thu, Nov 22, 2001 at 09:40:09AM +0100, Leo Sutic wrote:
> >
> > Line 86:
> > logTargetFactory =
> > (LogTargetFactory)
> > this.getClass().getClassLoader().loadClass( factoryClass
> ).newInstance();
> >
> > This leads to some classloader issues. Is there a reason for
> this or can the
> > context class loader be used instead?
>
> If I may take the opportunity to ask.. is the general rule that one
> should prefer the context classloader to that of the code's class?
Yes. See http://www.javageeks.com/Papers/ClassForName/index.html for why.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>