This page last changed on May 31, 2006 by tcarlson.

First take on implementing hot deployment in Mule ...

The goal of hot deployment is to enable runtime configuration changes to Mule without requiring a restart of Mule.

At mimimum, the following things should be possible via hot deployment:

  • route additions
  • route changes
  • route deletions
  • connector definition changes
  • transformer definition changes

To implement this, we need something (a Hot Deployment agent, see below) to listen on the Mule configuration directory and would invoke the redeployment process should one or more of the configuration files change. The redeployment process should probably be intelligent; that is, it should call for the redeployment of only specific components, not blindly redeploy the entire configuration.

Ross has suggested the following:

<!-- snip -->

Objects that should be hot deployable -

  • Components (MuleDescriptors)
  • Transformers
  • Endpoints
  • Connectors
  • Endpoint-Identifiers
  • Agents

The important ones are Components ,Transformers, and Connectors.

I guess we could have a base interface called Deployable that exposed methods:

  • Deploy
  • Undeploy
  • Configure(Node config)

Configure would configure the object based on a blob of xml, a node or maybe an xbeans object. It could also store its current version state with a version manager that could be used to restore the manager to a last known good state (maybe out of scope for you).

For this to work currently, the easiest way would be to cut the relevant digester rules out of the XmlConfig builder and have them run on the xml submitted in the configure method. Another change to the XmlConfigBuilder would be to call the configure method on the Deployable object passing in the xml.

Deploy would register itself with the manager, undeploy would deregister itself with the manager

Finally, you will want to expose these methods over JMX and/or have a HotDeployment agent that listens on a directory.

<!-- snip -->

Per all this, I'll start on the HotDeployment agent and scope out the changes to XmlConfigBuilder.

Lajos

Document generated by Confluence on Oct 03, 2006 09:23