JPlugin is a framework for managing, controlling, and accessing Java-based pluggable components.
Components are typically jars that may include other jars and/or resources. The default
messaging scheme is synchronous and exchanges POJOs between the main application and
the plugins. Plugins are loaded within their own isolated classloader and uniquely identified
by a name/version combination which allows concurrent loading of multiple versions of the
same plugin.
Primary components like the PluginManager, message Router, message Envelope, and EventManager
are interfaces which allows custom implentation if the default implementations aren't
sufficient for your project requirements. The current implementation uses a synchronous messaging scheme to talk to plugins.
Future versions may also add asynchronous messaging and dynamic proxies (for tighter
coupling of the main application to its plugins).
Phase I Requirements
Small footprint, minimal dependencies
Interface-based components to allow for custom implementations of plugin management and messaging
Isolated classloaders per plugin
Embedded jars and resources in plugin
Loosely-coupled message routing workflow
Plugin deployed as jar or directory
Re-use MANIFEST.MF syntax
JMX control and monitoring
Dynamic loading and unloading
Static loading and unloading
Phase I Pseudo-Requirements
Pseudo-requirements are those that aren't dictated by the project, but are interesting
ideas or technologies we wanted to implement.
Tightly-coupled, dynamic proxy access to plugin classes
JPlugin is functional and currently meets all the initial requirements. The initial
Router implementation (SimpleRouter) currently supports either direct addressing to a
specific version of a plugin or the most current revision of a plugin.
JPlugin presented at Java In Action 2005
JPlugin was introduced at
Java In Action
as a possible solution to a very small-scale JBI-like implementation for factory floor
system integration. The presentation slides can be viewed
at this link.