Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Create new component instances
  • Configuring / reconfiguring these instances
  • Destroying these instances
  • Reconfiguring instances by using Managed Services (not addressed in this page, see HERE here for further information)

The configuration admin is persistent, so stored configuration will be reload it the framework restarts.
Moreover, using the configuration admin allows avoiding describing instances inside iPOJO metadata file. These instances are created by inserting new configurations in the configuration admin.

...

All these examples are downloadable here. The archive contains both the project sources and a pre-configured version of felix.
To compile the project, launch ant from the config.admin.tutorial directory
Then, you can launch Felix by launching the following command from the felix-1.0.3 directory:

Code Block
Java -jar bin/felix.jar

...

The defined component type (Hello1) just creates a Hello1 object when the instance is created (thanks to the immediate attribute).
So if we deploy this bundle and add a consistent configuration we obtain (note that bundle need to be already compiled):

Code Block
-> start file:..\config.admin.tutorial\output\config.admin.tutorial.jar
-> create_conf hello1
Insert the configuration : {service.factoryPid=hello1}
-> Hello

...

This page has presented how to combine the configuration admin and iPOJO. Subscribe to the Felix users mailing list by sending a message to users-subscribe@felix.apache.org; after subscribing, email questions or feedback to users@felix.apache.org