[ https://issues.apache.org/jira/browse/ARIES-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14706925#comment-14706925 ]
John Ross commented on ARIES-1360: ---------------------------------- I think one reason is that it would most likely violate the specification, which says in 134.16.3: "A composite is a Scoped Subsystem with a sharing policy that by default does not share anything with its parent and therefore all sharing is fully explicit. Capabilities, such as packages and services, may be explicitly imported into or exported out of the composite." The intent of composites was always that the providers have full control, are fully aware of the content, and are responsible for their own destinies. Implementations should make no assumptions. Applications exist for those who want to take the easy road. There's not much, if anything, between the two approaches. A hybrid approach would require the definition of a new subsystem type I think. > ContentHandler must be explicitely imported in SUBSYSTEM.MF > ----------------------------------------------------------- > > Key: ARIES-1360 > URL: https://issues.apache.org/jira/browse/ARIES-1360 > Project: Aries > Issue Type: Bug > Components: Subsystem > Affects Versions: subsystem-2.0.2 > Reporter: Alexandre Roman > Labels: easyfix > > A custom ContentHandler implementation is not "seen" by a scoped subsystem if > the SUBSYSTEM.MF does not include a "Subsystem-ImportService" entry for this > interface. > The problem is located in CustomResources.java. The ContentHandler references > are searched in the subsystem context. Such references should be looked up > from the system bundle context, removing the need to import this service in > subsystems manifest. > {code:title=CustomResources.java} > for(ServiceReference<ContentHandler> ref : > subsystem.getBundleContext().getServiceReferences(ContentHandler.class, > "(" + ContentHandler.CONTENT_TYPE_PROPERTY + "=" + type + > ")")) { > return ref; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)