[
https://issues.jboss.org/browse/FORGE-1876?page=com.atlassian.jira.plugin...
]
George Gastaldi updated FORGE-1876:
-----------------------------------
Description:
Having an addon that depends on the furnace-cdi container and declares the following
class:
{code}
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();
}
}
{code}
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
was:
Having an addon that depends on the furnace-cdi container and declares the following
class:
{code}
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();
}
}
{code}
Then:
- {{AddonRegistry.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
Addon services should be exposed through @Produces methods
-----------------------------------------------------------
Key: FORGE-1876
URL:
https://issues.jboss.org/browse/FORGE-1876
Project: Forge
Issue Type: Enhancement
Components: Furnace CDI
Affects Versions: 2.6.0.Final
Reporter: George Gastaldi
Fix For: 2.x Future
Having an addon that depends on the furnace-cdi container and declares the following
class:
{code}
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();
}
}
{code}
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
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)