Technology for enabling Plug-ins under Tomcat
hi,
My client is looking for a framework that will enable her to write and deploy plugins on its system.
Had the runtime environment been JBoss, I would've picked MBeans, but since they are using Tomcat, that is not an option.
At some stage the idea of using OSGi has been brought up. However, transforming the entire system to be OSGi based seem to mean a lot for production site. On the other hand, OSGi features such as classloading domains, restricted module dependency etc. all may be useful in the future. Their question is: What does it mean using OSGi as a part of an application? Does it require changing the entire runtime from grounds up or can it be used only for one, specific subsystem? can it be used only for loading plugin bundles instead of the entire app? are there any in-avoidable transition sosts (i.e. build, execution scripts, etc.) ?
thanks,
Zvika

Comments
Two options to explore:
1. Explore Hudson server code, it implements a plugin framework (.hpi) files
2. try to use JPF http://jpf.sourceforge.net/
It may be just JBoss microcontainer inside Tomcat
thanks! will check both
i've used jpf and it is a very nice package. we've used 0.8, and i see there is now 1.5, but it is more than 2 years old. the main issue i have with jpf is that it requires each plugin to be "wrapped" in an xml declaration.
i didn't use osgi to load wars, but afaik, both spring dm and pax have support for loading wars into an osgi container. the war should behave as usual (the main issue is providing a context class loader). however, in order to use the dynamic nature of osgi, the application will need to be osgi aware. either by using spring-dm to cross-wire services across bundles, or retaining a reference to the bundle context object. i use a plugin system based on osgi and it works very nicely.
Adopting OSGi requires patience
http://www.theserverside.com/news/thread.tss?thread_id=57009