I have two version of my jar file in jboss lib folder. Can I use API's of both the jar files as and when needed from my war file? If yes then how will I differentiate in the code for which version of jar file to use?
I dont ahve any idea about creating a customized class loaders. Can you please tell me some good tutorials and examples available on net, which i can use for my reference.
Joined: Mar 22, 2005
If you're not familiar with class loaders, this may be a tall order. The SecurityFaq links to a few articles on the subject; I particularly recommend the first one titled "CLASS LOADERS AS A NAMESPACE MECHANISM".
An alternate solution -if you have a limited number of API versions to support- might be to include the API version somewhere in the package name hierarchy. Then the code would explicitly use different classes (representing different API versions) as appropriate.