1 Reply Latest reply on Apr 9, 2019 4:07 AM by manovotn

    It looks like ClassFileServices implementations are not loaded with ServiceLoader, correct?

    ljnelson

      If I make a ClassFileServices implementation and a corresponding META-INF/services/org.jboss.weld.bootstrap.api.Service file with the appropriate line in it, I expect my ClassFileServices implementation to be used.  It is not.  Reading the code shows me that the DiscoveryStrategyFactory knows only of the built-in Jandex- and reflection-based options with no chance of extension.  Is this correct?

       

      Best,

      Laird

        • 1. Re: It looks like ClassFileServices implementations are not loaded with ServiceLoader, correct?
          manovotn

          Hi Laird

           

          I don't think we have had anyone brave enough to provide their own implementation so far ;-)

          But yes, this isn't really loaded via ServiceLoader.

           

          I suppose you are talking Weld SE here (it works differently in EE) in which case there are two discovery strategies - reflection and Jandex.

          Reflection doesn't use this at all (simply giving back null) while Jandex has its own implementation of ClassFileServices that is directly instantiated.