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 ;-)

-Bertrand


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to