user6438693
user6438693

Reputation:

Apache Felix File Install example in karaf

Is there any example of how to configure/install Apache Felix File? On the official website, it mentions that you need to configure properties, etc. But nowhere have they mentioned where you need to put those configuration properties - how to set it up, etc.

I have deployed a org.apache.felix.fileinstall-3.5.0.jar file in karaf and I have the felix framework installed. Now I don't know where should I put those configuration properties so that the file install will read it.

Can anyone guide me on this?

Upvotes: 1

Views: 1368

Answers (1)

Achim Nierbeck
Achim Nierbeck

Reputation: 5285

Why did you re-install the felix file install bundle in Karaf? It's already provided out-of-the-box with Apache Karaf. The configuration for felix file-install is also explained in the documentation of Apache Karaf. See section 4.8.1.

For the people searching for quick help here's an excerpt of it:

felix.fileinstall.enableConfigSave = true
felix.fileinstall.dir    = ${karaf.etc}
felix.fileinstall.filter = .*\\.cfg
felix.fileinstall.poll   = 1000
felix.fileinstall.noInitialDelay = true
felix.fileinstall.log.level = 3
felix.fileinstall.log.default = jul

It enabled to save configurations back to files, if those configurations contain the flag needed. This is a special handling of configuration admin service and file install.
It searches the etc folder of karaf for new configuration files which again will be used to configure via configuration admin service.
The filter for those configuration files is set to .cfg.
Every 1000 ms the directory defined will be polled.
No delay when starting.
Loglevel is set to 3 and it uses the jul logger.

Upvotes: 2

Related Questions