Description
we don't yet support the various camel annotation injections in CDI yet; we should support the same capabilities as we have in spring/guice
http://camel.apache.org/bean-integration.html
http://camel.apache.org/bean-injection.html
I guess a more CDI way to do endpoint injection might be to have an annotation for endpointURI specification. Then you'd either use
public class MyBean { // named reference injection @Inject @Named("foo") Endpoint bar; // URI based injection @Inject @Uri("mock:whatnot") MockEndpoint foo; ... }
Rather than using the DI-agnostic @EndpointInject annotation - though I guess we could support it too (though having Inject twice looks a bit icky and not as DRY)...
public class MyBean { // using current annotation... @Inject @EndpointInject(uri = "mock:whatnot") MockEndpoint bar; ... }
For handling @Consume it would be nice to avoid having to use @Inject too as that seems a bit odd (since there's no injection going on).
For @Produce I guess we could support a straight @Inject of a ProcessorTemplate; allowing use of @Uri annotation to specify the default URI to send to
Attachments
Issue Links
- Is contained by
-
CAMEL-9201 Improved Camel CDI component
- Resolved
- is superceded by
-
CAMEL-9201 Improved Camel CDI component
- Resolved
- relates to
-
OWB-700 ProcessInjectionTarget.setInjectionTarget() has no effect when trying to post process beans
- Closed
-
CAMEL-5422 Align camel cdi integration with other dependency injection containers
- Resolved