m�n 2003-03-10 klockan 21.15 skrev Scott M Stark:
> I have not tested the java2ParentDelegaton addition, but yes this can only come
> in at the loader repository level which is either the cache or the ordering
> of the class loaders as determined by getPackageClassLoaders. If java2ParentDelegaton
> is false, then the child loader repository's should not look to its parent loader
> repository cache until it as checked its cache as well is its local class loaders. 
> This
> allows MyInterface.class to be loaded from the child regardless of its existence
> in the parent loader repository. I'll be completing a few class loader changes today
> and tomorrow and then doing an 3.2.0RC4 release so see if these accomodate
> legacy deployment packagings any better.

Great, I look forward to see what you will do. My experience from the
current way is however that the "load local first" is really the way if
works (except if a class is available in cache higher up the chain)
since a component is now in one classloader and that that classloader
will have its way before getPackageClassLoaders. The hard thing to get
working is to have it load classes that exists "above" it before it
tries the local ones (this would make it possible to place interface
classes globale when working i JBoss without having to exterminate them
from all local ejb-jars and whats more.

//Peter
> 
> 
> xxxxxxxxxxxxxxxxxxxxxxxx
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx
> 
> ----- Original Message ----- 
> From: "Peter Antman" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 10, 2003 11:26 AM
> Subject: Re: [JBoss-dev] Possibility to override LoaderResository
> 
> 
> > 
> > Hi,
> > I saw you changes in cvs regarding mx.loading. Great that you are
> > relaxing the signature restriction! But I also saw that you have added
> > the possibility to let the heirirachical load from parent first; this
> > would be a welcome addition and might perhaps make it a little bit
> > easier to live with the current classloader architecture (one might at
> > least place interface/param classes in the global repository). However;
> > i do not understand how it will work.
> > 
> > As far as I can see this would be done through heir.loadClass(), but as
> > far as I can see it this method is never ever called (except from
> > UnifiedClassLoader.loadClass, but wich is overridden in 
> > UnifiedClassLoader3.
> > 
> > Is not the loading scheme actually this:
> > 
> > ucl3.loadClass->LoadMgr->beginLoadTask(and then either - i order).
> > 
> > 1. ucl3.repository->loadClassFromCache
> > 
> > 2.
> > ucl3.repository->loadClassFromClassLoader->ucl3->loadClassLocally->ucl.super.loadClass()
> > 
> > 
> > 3.
> > ucl3.repository->getPackageClassLoaders->ClassLoadingTask->run->ucl3->loadClassLocally.
> > 
> > 
> > As far as I can see it there is nowhere in this scheme that java2 parent
> > delegation actually can play any role apart from the cache (the class
> > must already have been loaded in a parent) and in getPackageClassLoader.
> > The following scenario for example would not allow for Java2 parent
> > delegation.
> > 
> > Global rep: MyInterface.class
> > HeirRep: MyInterface.class MyImpl.class
> > 
> > Because if MyImpl.class was loaded the first and MyInterface.class was
> > not previously loaded we would end up in stage 2 and the classloader
> > would load MyInterface.class from HeirRep. The only way in the current
> > scheme would be to do something with loadClassFromClassLoader.
> > 
> > Another thing I have been noting during my (frustrating) work with this
> > how the caching work in an hierarchical situation: when classes are
> > loaded through getPackageClassLoader classes will be cached not in the
> > repository the class had its classloader, but in the repository where
> > the classloader how started the loading is located. This means that a
> > class can actually be loaded through a repository hier up the chain
> > without being cached there.
> > 
> > Should not this part in LoadMgr:
> > 
> >  if( loadTask.threadTaskCount == 0 )
> >       {
> >          Class loadedClass = threadTask.getLoadedClass();
> >          if( loadedClass != null )
> >          {
> >             ClassLoader loader = loadedClass.getClassLoader();
> >             // Place the loaded class into the repositry cache
> >             repository.cacheLoadedClass(threadTask.getClassname(),
> >                loadedClass, loader);
> >          }
> >          synchronized( loadTask )
> >          {
> >             loadTask.state = ClassLoadingTask.FINISHED;
> >             loadTask.notify();
> >          }
> >       }
> > 
> > Instead use the UCL3.repository to cache the class?
> > 
> > Well, some comments just. And by the way: thanks for all your hard work.
> > 
> > //Peter
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
-- 
------------------------------------------------------------
Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
CTO                      WWW: http://www.tim.se
Email: [EMAIL PROTECTED]        WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 
------------------------------------------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to