db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David W. Van Couvering" <David.Vancouver...@Sun.COM>
Subject Re: context classloader versus default classloader
Date Tue, 22 Nov 2005 23:46:50 GMT
A quick note: it appears I'm not the only one who struggles with this 


David W. Van Couvering wrote:
> Hi.  I am a little confused between two different "current classloaders" 
> that are available to appication code:
> this.getClass().getClassLoader() -- what I call the "default classloader"
> Thread.currentThread.getContextClassLoader() -- what I call the "context 
> classloader"
> When I am creating my own classloader, I want to identify the parent 
> classloader.  Which one of these should I use?  I noticed that the 
> engine code uses the context classloader to load application classes, 
> but sets the default classloader to be its parent when creating a 
> classloader for loading generated bytecode.
> Any and all tips would be most appreciated.
> Thanks,
> David

View raw message