Peter,

Hi,

I ended up playing for about six hours today trying to get the ClassLoader stuff working again today. There was a few issues. Namely that each time a resource was accessed it would reload, scan and build a JarFile and so on which was killing performance. There was also no way to specify permissions and a whole bunch of other stuff. Also we really can't take over the URL.setURLStreamHandlerFactory() because our hosted apps may want to use it.

I though about a chaining concept. That could work with URLStreamHandlerFactory if everyone follows the rules.

So I started refactoring but really didn't come up with any ideas. I gotta say that I HATE the way they did protocol handling in the JVM though ;)

Indeed.  Anything even vaugelly static sucks.  IoC rocks!

Anyways there is only one thing that I haven't done yet that will probably work. It is ugly but the only option I can see ;( (Well other than writing our own ClassLoader which is probably heaps of work).

Have you seen : http://www.yagga.net/java/metajar/

Could we persuade the guy to donate to Apache if it's any good. I think it uses a hook-class concept.

Essentioally we have the code for the SarURLHandlerStream and friends in base classloader and in the system search path for that sort of stuff. We then have each thread store which current application it is dealing with and work that way. A bit ugly and britlle but it should work.

Thread per SAR?  Hmmm, that's a bit smelly, but you're the boss.

Regards,

- Paul H


-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to