Hi Charlie

On 5 November 2014 09:41, Charlie Mordant <[email protected]> wrote:
> Hi again,
>
> Reading the docs, Aries spi-fly is only weaving
> java.util.ServiceLoader#load(java.lang.Class) method signature.
> Unfortunately, in deltaspike, they use
> java.util.ServiceLoader#load(java.lang.Class, ClassLoader), where the
> classloader used is the one from the ServiceUtils one (ds-api one).
>
> Is there a way to hack this?

The main problem with ServiceLoader.load(Class) is that it uses the
Thread Context Classloader to decide where to look for providers.

When you're using ServiceLoader.load(Class, ClassLoader) you're
already providing the classloader so at least the TCCL problem isn't
there, so it may just work without SPI-Fly. If not, what is the
remaining problem? If there is one, we should enhance SPI Fly to
support it...

Cheers,

David

Reply via email to