Torsten Curdt pisze:
Well, the only thing I could think of right now:
Define a common interface that is loaded by parent. Delegate to an
implementation of that from EXTENSION. That should work.
But if you want to extend something that is changing (and not has a fix
interface) you will have to load it from the RSCL.
Yes, that could work but there is another problem. Once EXTENSION obtains ApplicationContext and
tries to load some beans ClassCastExceptions will be thrown because EXTENSION holds references to
interface classes loaded by parent and ApplicationContext holds references to interfaces loaded by
RCL. In short: a mess.
Well, the RCL currently is pointed to a folder of class files. It should
not be too hard to also have it monitor a directory of jars.
I know that's its not hard when it comes to modifying the code but I was wondering if it's a good
idea in general to load everything using ReloadingClassLoader. It was not done in the first time so
I thought that someone had a good reason to do that.
Anyway, I decided to rewrite 3RDPARTY the way that I can inject my own extensions so I could get rid
of static class completely. God bless open source 3RDPARY dependencies ;-)
If anyone else is reading this thread: Lesson for everyone - static classes and variables are not so
static when you use different classloaders. Moreover, they are not a good idea in any case.
Thanks for help.
--
Best regards,
Grzegorz Kossakowski