You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2014/12/02 12:14:12 UTC

[jira] [Commented] (DELTASPIKE-793) Remove Classloader references in /org/apache/deltaspike/core/util/ServiceUtils

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

Gerhard Petracek commented on DELTASPIKE-793:
---------------------------------------------

per default we delegate to java.util.ServiceLoader without a given classloader.
passing in a classloader to ServiceLoader#load is just a fallback.
if your environment doesn't support java.util.ServiceLoader, you have an issue anyway.

>  Remove Classloader references in /org/apache/deltaspike/core/util/ServiceUtils
> -------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-793
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-793
>             Project: DeltaSpike
>          Issue Type: Wish
>            Reporter: Charlie Mordant
>            Priority: Minor
>
> Reference to the current classloader is not so good in a modular environment (e.g. OSGI).
> It is for example impossible to dynamically contribute to Config source and configsourceresolver if we're not in the same classpath as deltaspike-core, which is not an easy task (and a poor design).
> Removing reference to the current classloader would help as their exist some tools (i.e. Aries Spi-Fly) that can weave serviceloader calls to make them OSGI compatible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)