Directory deployer
Simple bundle which scans file system directories and installs/uninstalls bundles
found or removed from these directories.
This is a quite useful tool for handle bundle deployment without using any
console. Just copy the bundles that should be started to the deploy
directory, and the directory deployer will find and start them. When the
files are removed, they are uninstalled.
Deploy method
The procedure for scanning and deploying is as follows:
-
Check if any new files have appeared or
if any already deployed files has been replaced with newer
files.
-
New files are installed into the framework.
If they have a bundle activator, they are marked for delayed start.
Files newer than a previously deployed bundle are updated.
-
Files that have the same location as an already installed
bundle is not installed again, instead, the installed bundle is
re-used in the created DeployedFile instance.
- Files marked for delayed start is started.
- Sleep a while
- Repeat from 1.
Configuration
See metatype.xml for specification using
CM. The same properties as defined by CM are also read as default values from the system properties. Thus, the
bundle can be both configured by CM and using system properties.
Quick guide to the metatype.xml format:
- Top level xsd:complexType is service PIDs
- xsd:element is a property
- metatype:values defines default values
For details on the metatype format, see http://www.knopflerfish.org/XMLMetatype/
The default directory used for scanning is deploy