[jboss-osgi-issues] [JBoss JIRA] (JBOSGI-775) ServiceLoader should work with module dependencies and capabilities

Arcadiy Ivanov (JIRA) issues at jboss.org
Sat Apr 18 08:38:18 EDT 2015


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

Arcadiy Ivanov commented on JBOSGI-775:
---------------------------------------

The following statements taken from the test case allow to load Java services:

{noformat}
DynamicImport-Package: META-INF.services,
 org.jboss.test.osgi.framework.serviceloader.*
Dependencies: moduleA meta-inf
{noformat}

* {{meta-inf}} can be replaces with {{services}} per [WildFly 8 Classloading|https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly]
* {{Dependencies}} are unnecessary if the capabilities are specified in the JBOSGI WildFly Subsystem configuration.
* {{DynamicImport-Package}} may be {{*}}, but that will increase the classloading overhead. It's better to increase dynamic package import specificity to speed up classloading.


> ServiceLoader should work with module dependencies and capabilities
> -------------------------------------------------------------------
>
>                 Key: JBOSGI-775
>                 URL: https://issues.jboss.org/browse/JBOSGI-775
>             Project: JBoss OSGi
>          Issue Type: Enhancement
>          Components: framework, resolver
>    Affects Versions: JBossOSGi 2.2.0
>            Reporter: Arcadiy Ivanov
>            Assignee: Arcadiy Ivanov
>             Fix For: JBossOSGI 2.3.1
>
>
> A bundle should be able to load Java SPI services from modules turned into OSGi Framework capabilities or from modules on which OSGi Bundle declares explicit MSC dependency with services and/or meta-inf option.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-osgi-issues mailing list