use of javax.inject.Named 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.inject.Named 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() {
PropertiesComponent component = new PropertiesComponent();
component.setLocation("classpath:application.properties");
return component;
}
use of javax.inject.Named in project camel by apache.
the class Config method properties.
@Produces
@ApplicationScoped
@Named("properties")
PropertiesComponent properties() {
PropertiesComponent component = new PropertiesComponent();
component.setLocation("classpath:jms.properties");
return component;
}
use of javax.inject.Named 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.inject.Named 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;
}
Aggregations