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

John Ross commented on ARIES-1360:
----------------------------------

Thinking about this some more, unless something has changed, Aries Subsystems 
currently supports the declaration of service dependencies only through 
Blueprint. 

So it would seem that applications using the embedded-resource attribute, or 
that might contain children using it, would need to declare the ContentHandler 
service dependency via Blueprint.

Alternatively, the application would need to contain at least one bundle with a 
manifest declaring that service dependency.

A third option would be for the implementation to detect the embedded-resource 
attribute in the Subsystem-Content header and automatically add the dependency.

> 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)

Reply via email to