use of javax.enterprise.context.ApplicationScoped in project camel by apache.
the class InjectedTypeConverterTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("property1", "value 1");
properties.put("property2", "value 2");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
use of javax.enterprise.context.ApplicationScoped in project camel by apache.
the class MultiContextPropertyInjectTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("property", "default");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
use of javax.enterprise.context.ApplicationScoped in project camel by apache.
the class PropertyInjectTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("property", "value");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
use of javax.enterprise.context.ApplicationScoped in project camel by apache.
the class UndefinedPropertyTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("from", "inbound");
// Do not add the looked up property for test purpose
//properties.put("to", "mock:outbound");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
use of javax.enterprise.context.ApplicationScoped 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;
}
Aggregations