...
Property | Default | Description |
---|---|---|
| 2000 ms | Number of milliseconds between 2 polls of the directory |
| ./load | The name of the directory to watch. Several directories can be specified by using a comma separated list. |
| 01 | Threshold of logging information |
| true | Automatically start newly discovered bundles |
|
| A regular expression to be used to filter file names |
| tmp | The name of the temporary directory to use with exploded or transformed bundles (defaults to the temporary dir for the JVM) |
| false | Determines if File Install waits |
| false | If |
| true | Start bundles with their default activation policy or not |
| false0 | If set to a value different from |
| 0 | FileInstall won't scan for files unless the active framework start level is greater than this value |
| true | If |
| false | If |
Once started, the values of these properties are printed to the console.
...
No Format |
---|
com.acme.xyz.cfg // configuration for Managed Service // com.acme.xyz com.acme.abc-default.cfg // Managed Service Factory, // creates an instance for com.acme.abc |
If a configuration managed by File Install is modified, File Install will write the configuration back to a property file to ensure peristence across restarts.
Property substitution in configuration files
It is possible to use system properties to specify the values of properties in configuration files. This is achieved through system property substitution, which is instigated by using ${<property>
} syntax, where <property> is the name of a system property to substitute. Bundle context properties will take precedence over system properties if available.
Example:
No Format |
---|
ftp.port = ${system.ftp.port} |
Watching multiple directories with File Install
Starting with version 3.1.0 it is possible to specify several directories to watch with the system property felix.fileinstall.dir
; this property can either point to a single directory or a comma separated list of directories. In addition, Apache Felix File Install provides a ManagedServiceFactory to create multiple instances of File Install. Asuming you have a File Install bundle watching a bundles
folder, creating a new instance is as simple as creating a new configuration file org.apache.felix.fileinstall-<pid>.cfg
in that folder (substitute <pid> with a unique Id for the new service instance):
...