@Qualifier @Retention(value=RUNTIME) @Target(value={TYPE,METHOD,FIELD,PARAMETER}) public @interface ContextName
CamelContext
beans can be annotated with the @ContextName
qualifier
so that the Camel context is named accordingly, e.g.:
@ApplicationScoped
@ContextName("foo")
public class FooCamelContext extends DefaultCamelContext {
}
Camel resources like route builders, endpoints and producer templates can be annotated with
the @ContextName
qualifier as well so that they are associated with the
corresponding Camel context, e.g.:
@ContextName("foo")
public class FooRouteBuilder extends RouteBuilder {
@Override
public void configure() {
from("direct:bar").to("mock:bar");
}
}
@Inject
@ContextName("foo")
@Uri("direct:bar")
ProducerTemplate barProducer;
@Inject
@ContextName("foo")
@Uri("mock:bar")
MockEndpoint barMockEndpoint;
CamelContext
public abstract String value
Apache Camel