My question is actually very simple, though the answer to it may be complex. Is it possible to load jars dynamically at runtime-or even replacing an already loaded one in a webcontainer context? In this specific case I am interested in the combination of Tomcat and Spring MVC but I guess that the technique, if any would be adaptable to other technology stacks.
If the answer to the question is yes, the immediate followup question is: Which is the most straightforward way to do it? I'm aware of OSGi and I'm pretty sure that it is possible with it to load jars dynamically in a webcontainer, but I would consider this a heavyweight solution.