Community

ClassLoading delegation

reply from rafael liu in JBoss Microcontainer - View the full discussion

Precisely. That's what I want. But I can't change the App1 (neither App2 or App3).. That's why I was setting ContextClassLoader: I know they use it for class loading. I do something like this:

 

Thread.currentThread().setContextClassLoader(delegatorClassloader);
RequestDispatcher dispatcher = appServletCtx.getRequestDispatcher(path);
dispatcher.forward(request, response);

 

It's pretty much the approach you suggested, but done dynamically. I was thinking about writing my own classloader, any idea how it cann be done with MC? Certainly it would be much prettier..

 

Thanks

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community