[jboss-jira] [JBoss JIRA] (AS7-4211) Make Resolver service publicly available

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Tue Mar 20 09:24:47 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677963#comment-12677963 ] 

Thomas Diesler commented on AS7-4211:
-------------------------------------

{code}
    public void testResolveModule() throws Exception {

        // Build a resource with a package requirement
        XResourceBuilder builder = XResourceBuilderFactory.create();
        builder.addIdentityCapability("somename", null, IDENTITY_TYPE_UNKNOWN, null, null);
        builder.addPackageRequirement(SimpleService.class.getPackage().getName(), null, null);
        XResource resource = builder.getResource();

        // Find the providers for the requirement
        Map<Resource, List<Wire>> wiremap = getResolver().resolve(getEnvironment(), Collections.singleton(resource), null);
        assertEquals(2, wiremap.size());

        List<Wire> wires = wiremap.get(resource);
        assertEquals(1, wires.size());
        Wire wire = wires.get(0);
        assertEquals(resource, wire.getRequirer());
        XResource provider = (XResource) wire.getProvider();
        XIdentityCapability icap = provider.getIdentityCapability();
        assertEquals("deployment.example-module-reg", icap.getSymbolicName());
    }
{code}
                
> Make Resolver service publicly available
> ----------------------------------------
>
>                 Key: AS7-4211
>                 URL: https://issues.jboss.org/browse/AS7-4211
>             Project: Application Server 7
>          Issue Type: Task
>          Components: OSGi
>            Reporter: Thomas Diesler
>            Assignee: Thomas Diesler
>             Fix For: 7.1.2.Final
>
>
> Currently, the Resolver service is an API private to the OSGi layer. This should be publicly available to other AS services.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list