You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre De Rop (JIRA)" <ji...@apache.org> on 2013/02/01 17:24:13 UTC

[jira] [Commented] (FELIX-3869) Fragment support for DependencyManager-Component

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

Pierre De Rop commented on FELIX-3869:
--------------------------------------

Hi Tuomas,

I committed in revision 1441505 the patch you submitted (many thanks to you !), and slightly modified it in the following ways:

- since the PackageAdmin can be injected as a null object  (when dependency is optional), I removed the check-if-not-null from the DependencyManagerRuntime class file.
- in the bundleStarted method, I slightly modified the proposed patch in order to always invoke the loadDescriptor(Bundle b, String url) method with the
fragment-host bundle and not the fragments bundles, because we have to load component classes using  the host bundle class loader, not from the fragments bundles.

I tested the patch using Felix and Equinox. 
I'm closing now this issue. Feel free to reopen if you are not satisfied.

/Pierre

                
> Fragment support for DependencyManager-Component
> ------------------------------------------------
>
>                 Key: FELIX-3869
>                 URL: https://issues.apache.org/jira/browse/FELIX-3869
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Tuomas Kiviaho
>            Assignee: Pierre De Rop
>         Attachments: Activator.patch, DependencyManagerRuntime.patch
>
>
> I've a use case where fragment support would be most welcome when declaring dependencies.
> I propose that the 'DependencyManager-Component' header would cover fragments just like 'Service-Component' header does as per OSGI spec 112.4.1 Service Component Header. This is quite easily implemented when BundleWiring is supported although it would require shifting compilation to version 1.6. Current 1.5 version could use PackageAdmin.
> ***
> A Service-Component manifest header specified in a fragment is ignored by 
> SCR. However, XML documents referenced by a bundle’s Service-Component manifest header may be contained in attached fragments. 
> SCR must process each XML document specified in this header. If an XML 
> document specified by the header cannot be located in the bundle and its 
> attached fragments, SCR must log an error message with the Log Service, if 
> present, and continue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira