You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (Commented) (JIRA)" <ji...@apache.org> on 2012/02/29 09:25:57 UTC

[jira] [Commented] (SLING-2428) JcrInstaller does not provide hint properties of node location that caused configuration changes

    [ https://issues.apache.org/jira/browse/SLING-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218983#comment-13218983 ] 

Felix Meschberger commented on SLING-2428:
------------------------------------------

> - specifying the node name as <factory PID>-<somename should create a config with pid=<factory PID>-somename

No, because the Configuration Admin specification prescribes that the PID of a factory configuration is generated by the Configuration Admin implementation and cannot be influenced. So, there is no way of doing something like this.

- OR the config with <generated PID> should include a property like "installation.hint" to indicate the location of the config node

We had that because we needed that for the implementation of the Installer. But AFAICT the OSGi Installer now uses a different mechanism to keep track of configuration nodes are there Configuration objects and so we don't need this information any longer.

What is your requirement to be able to correlate a Configuration object to a repository node (may also be a filesystem file btw) ?
                
> JcrInstaller does not provide hint properties of node location that caused configuration changes
> ------------------------------------------------------------------------------------------------
>
>                 Key: SLING-2428
>                 URL: https://issues.apache.org/jira/browse/SLING-2428
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: Installer Core 3.3.4
>            Reporter: Tyson Norris
>
> I'm using JcrInstaller to generate config instances for a ManagedServiceFactory. These configurations get a generated service.pid, and no properties indicating that this was generated via jcr node.
> Per the docs at http://sling.apache.org/site/jcr-installer-jcrjcrinstall-and-osgiinstaller.html
> I was looking for this: "A node named like o.a.s.foo.bar-a uses o.a.s.foo.bar as its factory PID creating a configuration with an automatically generated PID. The value of a is stored as an alias property in the configuration to correlate the configuration object with the repository node - demonstrate that." 
> I think that either or both should work:
> - specifying the node name as <factory PID>-<somename should create a config with pid=<factory PID>-somename
> - OR the config with <generated PID> should include a property like "installation.hint" to indicate the location of the config node
> A few noticable problems:
> - In http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/FileNodeConverter.java - It looks like the InstallableResource is created with a Dictionary AND InputStream, and the dictionary gets the hint added, but OsgiInstallerImpl.java ignores the Dictionary if InputStream is provided.
> - It also looks like the hint is added with a value of the parent node - I would expect this to be the actual file node that contains the config, not the parent of the file node.
> - in http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/ConfigNodeConverter.java - should work similar with regard to adding the hint property
> If there is another way to correlate a ManagedServiceFactory config instances with jcr installer sling:OsgiConfig nodes, please let me know.
> Thanks
> Tyson

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira