You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "J.W. Janssen (JIRA)" <ji...@apache.org> on 2014/02/17 12:25:19 UTC

[jira] [Created] (FELIX-4426) Allow DM to manage collections of services

J.W. Janssen created FELIX-4426:
-----------------------------------

             Summary: Allow DM to manage collections of services
                 Key: FELIX-4426
                 URL: https://issues.apache.org/jira/browse/FELIX-4426
             Project: Felix
          Issue Type: New Feature
          Components: Dependency Manager
            Reporter: J.W. Janssen


DM has great support for single-cardinality dependencies, allowing you to only declare the dependency as (volatile) field. For multiple-cardinality dependencies, no such support is present, forcing you to always manually implement this using callbacks.

It would be great if I could declare multiple-cardinality dependencies like:

{code}
private volatile List<MyService> m_services;
{code}

and let DM manage the list for me.

Note that you need some additional reflection mojo to obtain the actual collection type. An example of how this can work can be found in a utility class for Swagger in the Amdatu-Web project, see https://bitbucket.org/amdatu/amdatu-web/src/master/org.amdatu.web.rest/src/org/amdatu/web/rest/doc/swagger/SwaggerUtil.java?at=master#cl-304




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)