aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Ross (JIRA)" <>
Subject [jira] [Commented] (ARIES-1360) ContentHandler must be explicitely imported in SUBSYSTEM.MF
Date Thu, 20 Aug 2015 17:59:45 GMT


John Ross commented on ARIES-1360:

David Bosschaert, looks like you're the one that added the content handler functionality.
Do you have any thoughts on this? We search for content handler services using the bundle
context of the subsystem that will become the parent of the one currently being installed
and containing the custom content. This would require the handler service to be registered
using the bundle context of every subsystem that might become a parent of a subsystem that
contains the custom content or, as Alexandre mentions, an import service header. I'm wondering
if a better approach would be to look for these services using the subsystem-core bundle context
similar to repository services? 

> ContentHandler must be explicitely imported in SUBSYSTEM.MF
> -----------------------------------------------------------
>                 Key: ARIES-1360
>                 URL:
>             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 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.
> {}
> for(ServiceReference<ContentHandler> ref :
>     subsystem.getBundleContext().getServiceReferences(ContentHandler.class,
>                     "(" + ContentHandler.CONTENT_TYPE_PROPERTY + "=" + type + ")")) {
>                 return ref;
>             }
> {code}

This message was sent by Atlassian JIRA

View raw message