cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <>
Subject Re: ReloadingClassloader events
Date Tue, 22 Feb 2005 06:19:44 GMT
Le 21 févr. 05, à 21:56, Torsten Curdt a écrit :

> ...How do I get hold of that instance of the classloader
> so I can you can subscribe to the events?...

> ...     if (cl instanceof ReloadingClassLoader) {
>        ((ReloadingClassLoader)cl).addListener(object);...

Sounds right, the reloading is dependent on a given ClassLoader anyway, 
so it seems to make sense for the ClassLoader to be the (maybe 
indirect) source of events.

Also, I think the event must include the Class object that is being 
reloaded, or at least its fully qualified name, so that subscribers can 
filter out events if needed.

I don't know if cascading events are needed - does a ClassLoader need 
to listen to events from its parent ClassLoader and fire them to its 
listeners as well? I'd tend to say yes but don't have a specific use 
case to back this up ATM (it's only 7:20 AM here though ;-)


View raw message