use of javax.enterprise.inject.Produces in project camel by apache.
the class Application method properties.
@Produces
@ApplicationScoped
@Named("properties")
// "properties" component bean that Camel uses to lookup properties
PropertiesComponent properties(PropertiesParser parser) {
PropertiesComponent component = new PropertiesComponent();
// Use DeltaSpike as configuration source for Camel CDI
component.setPropertiesParser(parser);
return component;
}
use of javax.enterprise.inject.Produces in project camel by apache.
the class PropertiesConfigurationTest method propertiesComponent.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent propertiesComponent() {
Properties configuration = new Properties();
configuration.put("property", "value");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(configuration);
component.setLocation("classpath:camel1.properties,classpath:camel2.properties");
return component;
}
use of javax.enterprise.inject.Produces in project jetty.project by eclipse.
the class JettyWebSocketSessionProducer method getSession.
@Produces
public Session getSession(InjectionPoint injectionPoint) {
if (LOG.isDebugEnabled()) {
LOG.debug("getSession({})", injectionPoint);
}
WebSocketScopeContext ctx = WebSocketScopeContext.current();
if (ctx == null) {
throw new IllegalStateException("Not in a " + WebSocketScope.class.getName());
}
org.eclipse.jetty.websocket.api.Session sess = ctx.getSession();
if (sess == null) {
throw new IllegalStateException("No Session Available");
}
return sess;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class CamelSAPConnectionConfigurationProducer method create.
@Produces
@Named("sap-configuration")
public SapConnectionConfiguration create(@Named("destinationDataStore") Map<String, DestinationData> destinationDataStore, @Named("serverDataStore") Map<String, ServerData> serverDataStore) {
SapConnectionConfiguration conf = new SapConnectionConfiguration();
conf.setDestinationDataStore(destinationDataStore);
conf.setServerDataStore(serverDataStore);
return conf;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class DestinationMetadataProducer method createDestinationData.
@Produces
@Named("nplDestinationData")
public DestinationData createDestinationData() {
DestinationData data = RfcFactory.eINSTANCE.createDestinationData();
data.setAshost("nplhost");
data.setSysnr("42");
data.setClient("001");
data.setUser("developer");
data.setPasswd("ch4ngeme");
data.setLang("en");
return data;
}
Aggregations