I want to make my Java EE application pluggable. The main application would be deployed in an ear, but its code in EJB would contain entry points for plugins. Plugins could be deployed on their own jar file. Is there any good framework to do this? I’m looking for just a lightweight framework.
What should I read or learn to make such a framework?
OSGi would be a good fit for this. Either Apache Felix or Eclipse Equinox can be started up inside your Java EE application and OSGi bundles (jar files with some extra entries in the MANIFEST.MF file) can be deployed to them.
There’s some good information about embedding Felix here: http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-embedding