-
Enhancement
-
Resolution: Done
-
Major
-
2.6.0.Final
-
None
Having an addon that depends on the furnace-cdi container and declares the following class:
import javax.enterprise.inject.Produces; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; public class RestClientProducer { @Produces public ClientBuilder createClientBuilder() { ClientBuilder builder = ClientBuilder.newBuilder(); return builder; } @Produces public Client createClient(ClientBuilder builder) { return builder.build(); } }
Then:
- WeldServiceRegistry.hasService(javax.ws.rs.client.Client.class) should return true
- AddonRegistry.getServices(javax.ws.rs.client.Client.class).get() should call the producer method and return the requested service