JBoss - different class loading system in the same application - possible?
I looked at this article that talks about JBoss class-loading, but still got scenario that I'd like to verify:
in case I have got a utility class that is located both in the application's archive (myApp/WEB-INF/lib) and in the server/default/lib but with different version in each one of the archives. Now I'd like that classes from my application from package com.x will use the application's archive utility class and the classes from package com.y will use the server/default/lib version of t开发者_StackOverflow中文版he utility class. Is it possible? Is it possible to isolate different packages inside the same application and give them different class-loading order??Sounds to me that you would like to use a different mechanism than class loading to solve this. Have you considered using AOP for this?
Though if you want to do something that you describe, then you must probably involve different classloaders for the classes in package x and y, so you can control which classes they are uses.
精彩评论