Struts 2 Experiments with Hot Deployable Plugins
Apache Struts, the ubiquitous Java web application framework, received a promising feature that permits hot-deployable plugins. Struts developer, Don Brown, revealed last week that work had begun on allowing plugins to be added, removed and upgraded instantly, without the need to restart the entire application.
Brown mentioned how he was impressed by the plugin systems used by Atlassian's JIRA and Confluence products (Atlassian happens to be Brown's employer) which supports hot-deployable plugins. He wanted to bring something similar to Struts, which would clearly benefit from having such a feature. Thus work began on the OSGi plugin.
On top of the advantages of being able to maintain application uptime, and thus eliminate interruptions to users, there are pluses for the application development side also. Don notes:
This capability is so powerful that internally we are moving more and more functionality into plugins as a way to organise our codebase and keep it tightly-focused and agile.
The new Struts plugin allows the developer to split up applications into discrete jars, or "bundles", which when placed in the appropriate location on the server will be picked up by the OSGi plugin and deployed. Minimal effort is required to get the plugin up and running, and one of Brown's goals is to keep bundle development simple by hiding many of the OSGi complexities from the developer (of course, he's preparing for a small backlash as he admits "OSGi experts would lament" at his decision).
Currently, the OSGi Plugin is in its early stages and has not had sufficient levels of testing to be classed as ready for production. There are several limitations in the current release, namely lack of a GUI administration utility; only Velocity templates are supported; plus certain restrictions on what is permissible within a bundle (no 3rd party jars). The source is publically available via the Apache Struts 2 sandbox, and in true Apache style, community participation is welcome. As of yet, there's no hint that the plugin innovations in Struts 2 will be back-ported to Struts 1.
They read my mind
Re: They read my mind
OSGi will become hotter than it already is.
Richard L. Burton III
Richard L. Burton III
Juergen Hoeller,Stéphane Nicoll Dec 18, 2014
Helen Walton Dec 17, 2014