You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Róbert Csákány (JIRA)" <ji...@apache.org> on 2010/02/19 19:32:28 UTC

[jira] Updated: (FELIX-2100) Initial Config Loader

     [ https://issues.apache.org/jira/browse/FELIX-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Róbert Csákány updated FELIX-2100:
----------------------------------

    Attachment: configloader.zip

I've made the bundle. Please review and test it. In my Sling environment it works
correctly.
------------------------------------------------------
The attached bundle provides initial configuration loading through bundles.

This bundle initialize configuration or factory configurations from the bundles are 
ACTIVE or became active. 
Any ACTIVE bundles that have Felix-Initial-Configuration entry in 
META-INF/MANIFEST.MF are processing. The Felix-Initial-Configuration contain 
path entries, thats are processed by this bundle. This bundle scan the path entries
for *.cfg - which is configurations for bundles (For more information check the 
fileinstall, the file format is same). In the processing of bundles the original 
configuration (if have) are saved in the "user.dir". When the bundle's status
changes from ACTIVE, the original config is restored (or if haven't got, deleted)

Example:

The bundle contains the following files:

- META-INF/MANIFEST.MF

Manifest-Version: 1.0
Felix-Initial-Configuration: SLING-INF/configuration
Built-By: robson
Build-Jdk: 1.6.0_17
Bundle-Version: 1.0.0
Tool: Bnd-0.0.357
Bundle-Name: liveSense Configuration Load Sample
Bnd-LastModified: 1266594965213
Created-By: Apache Maven Bundle Plugin
Bundle-ManifestVersion: 2
Bundle-Description: liveSense Configuration Load sample
Bundle-SymbolicName: org.liveSense.org.liveSense.sample.configurationLoad


- SLING-INF/configuration/org.apache.sling.fsprovider.internal.FsResourceProvider-ROOT.cfg
provider.roots=/fsroot
provider.file=/


When this package becomes active, the configloader creates an FsResourceProvider instance with 
the parameters. When the package stop, the FsResolverProvider instance deletes.


> Initial Config Loader
> ---------------------
>
>                 Key: FELIX-2100
>                 URL: https://issues.apache.org/jira/browse/FELIX-2100
>             Project: Felix
>          Issue Type: New Feature
>          Components: Bundle Repository (OBR), Configuration Admin
>            Reporter: Róbert Csákány
>         Attachments: configloader.zip
>
>
> I've a request to be able to make customer specific configuration bundles - bundles that includes Configurations for other bundles. If a bundle is deployed, extracts the configuration files and register it with configadmin. If bundle is removed, removes configurations. If you have ideas, please share it! (I'm new in this Felix world, I've used it only with Sling as a user)
> I will make a short proporsal and a whiteboard implementation.
> The name of impmelemtation is configloader
> The configloader service will implement the SynchronousBundleListener, and registering itself in activation and unregistering in deactivation.
> When a new bundle is registering, checking the Bundle-InitialConfigurations in META-INF/MANIFEST.MF file. If the entry is presented, checking the given folders for *.xml files describes the configurations entry. (To handle the Factory services also).
> Is it correct?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.