My application needs some components (jar files) to be loaded/unloaded dynamically on request. For example, I have abc.jar and xyz.jar and on demand my application should be able to load/unload abc.jar or xyz.jar or replace these jars with different versions of jars. Are there any approaches to load/unload jar files dynamically (i.e. without restarting the server)?
While reading in net I got few ideas about osgi, but I don't want to go into framework which may make complex. Is there are simple approach to achieve this? I am using Java, J2EE and Jetty 6 server.