The Deploy Swiftlet is responsible for the 'hot deployment'. It observes so-called deploy spaces and generates events if it detects changes there. The events are consumed from other Swiftlets which have registered listeners on that space.
A deploy space is an entity consisting of a directory path and a check interval. There can be unlimited deploy spaces defined where each deploy space is independent of each other.
The actual deployment within a deploy space is called a bundle. A bundle is a sub-directory below the deploy space directory path. It must contain a deployment descriptor called "config.xml" and at least 1 jar file. The content of the file config.xml is component specific.
The deploy space registers a timer on the defined check interval which observes the content of the deploy space' directory path of changes which are reported as events to the resp. listener.
The following example shows the structure of the deploy space "extension-swiftlets" with 1 deployed bundle, the Portmapper Extension Swiftlet:
deploy/router1/ <-- deploy path
xt$portmapper/ <-- bundle directory
config.xml <-- deployment decriptor
xt$portmapper.jar <-- a jar file
_deployed_1034610346186/ <-- actual deployment, don't change the content!
config.xml
xt$portmapper.jar
To redeploy (Bundle Changed event) a component, you can change the config.xml or the jar files directly below the bundle directory. Don't change the actual deployment directory because it is under control of the Deploy Swiftlet.
The Extension Swiftlet deployment is very simple. The distribution of the Extension Swiftlets contains a directory "deploy" where another directory with the Swiflet name is situated. This is e.g. "xt$bridge" to the JMS bridge. Please copy this directory (xt$bridge) into the router deploy directory (e.g. deploy/router1). The Extension Swiftlet is now automatically installed.
If you wish to install a new version of an Extension Swiftlet (in case an installation already exists), please copy the contents out of the directory with the name of the Extension Swiftlet (e.g. xt$bridge) into the directory of the same name of the router deployment directories (e.g. deploy/router1/xt$bridge). Hereupon, the old version is uninstalled and the new version is installed.
If you wish to uninstall an installed Extension Swiftlet please delete the content of the respective deployment directory of the Extension Swiftlet. The Swiftlet is now uninstalled.
The deployment bundle of an Extension Swiftlet consists of a file named "config.xml" and of at least one jar file. The file "config.xml" contains meta definitions of the Swiftlet configuration as well as CLI commands which are processed during the installation as well as during the de-installation. Thus, every Swiftlet defines its own resources, e.g. queues, threadpools etc. which are deleted again during a de-installation.
During the deployment a copy of "config.xml" and of the jar files is being made and copied into a seperate subdirectory, which contains a timestamp. These directories are administrated by the Deploy Swiftlet. They represent the deployment in fact. Please do not delete those. Directories which are no longer used contain a file ".deleted" and they are purged with the next startup.