...
Property | Default | Description |
---|---|---|
| 2000 ms | Number of milliseconds between 2 polls of the directory |
| ./load | The name of the directory to watch |
| -1 | Debug information |
| true | Automatically start newly discovered bundles |
Once started, the values of these properties are printed to the console.
...
No Format |
---|
# default port
ftp.port = 21
fto
|
Configuration file names are related to the PID and factory PID. The structure of the file name is as follows:
...
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 |
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.
Example:
No Format |
---|
ftp.port = ${system.ftp.port}
|
Watching multiple directories with File Install
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):
Code Block | ||
---|---|---|
| ||
felix.fileinstall.poll=2000
felix.fileinstall.dir=/configDir
felix.fileinstall.debug=-1
felix.fileinstall.bundles.new.start=false
|