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 the utility class.
Is it possible?
Is it possible to isolate different packages inside the same application and give them different class-loading order??
Asked
Active
Viewed 288 times
2

Spiderman
- 9,602
- 13
- 48
- 56
-
this might solve the problem that I raised here: http://stackoverflow.com/questions/2849036/configure-jboss-cache-to-run-on-jboss-server-4-2-3-ga – Spiderman May 19 '10 at 09:52
1 Answers
0
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.

Knubo
- 8,333
- 4
- 19
- 25