Examples in the real world:
- Mozilla Firefox addons
- NetBeans modules
- Eclipse IDE plugins
- Servlet containers and WARs
The plugin system requires the capability to load a plugin WAR (a sub-WAR, perhaps) inside an already running WAR. These plugin WARs can be added, removed, configured, at runtime just like relationship of normal WARs with the container.
Java Portlets are the closest thing to a standard way of doing this. You deploy portlet WARs into a Liferay container, easy. But since we're creating something like a Portlet container, it isn't straightforward.
OSGi is probably the best bet, however it also has its own complexities and classpath model.
What's your advice?