[jira] [Updated] (CAMEL-9798) camel-cdi - Add support for injecting default ProducerTemplate

2016-04-04 Thread Antonin Stefanutti (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-9798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antonin Stefanutti updated CAMEL-9798:
--
Fix Version/s: 2.18.0
   2.17.1

> camel-cdi - Add support for injecting default ProducerTemplate
> --
>
> Key: CAMEL-9798
> URL: https://issues.apache.org/jira/browse/CAMEL-9798
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-cdi
>Affects Versions: 2.17.0
>Reporter: Claus Ibsen
>Assignee: Antonin Stefanutti
> Fix For: 2.17.1, 2.18.0
>
>
> We should be able to inject a default producer template using
> {code}
> @Inject
> private ProducerTemplate template;
> {code}
> Currently that does not work and you get an error (see below)
> But if you setup a default endpoint with @Uri it works
> {code}
> @Inject @Uri("file:target/inbox")
> private ProducerTemplate template;
> {code}
> The error you get
> {code}
> org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied 
> dependencies for type ProducerTemplate with qualifiers @Default
>   at injection point [BackedAnnotatedField] @Inject private 
> camelinaction.FirstTest.template
>   at camelinaction.FirstTest.template(FirstTest.java:0)
> WELD-001475: The following beans match by type, but none have matching 
> qualifiers:
>   - Producer Method [ProducerTemplate] with qualifiers [@Excluded @Any] 
> declared as [[UnbackedAnnotatedMethod] @Produces @Excluded private static 
> org.apache.camel.cdi.CdiCamelFactory.producerTemplate(InjectionPoint, @Any 
> Instance, CdiCamelExtension)],
>   - Producer Method [ProducerTemplate] with qualifiers [@Excluded @Any] 
> declared as [[UnbackedAnnotatedMethod] @Produces @Excluded private static 
> org.apache.camel.cdi.CdiCamelFactory.producerTemplate(InjectionPoint, @Any 
> Instance, CdiCamelExtension)]
>   at 
> org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
>   at 
> org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
>   at 
> org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
>   at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
>   at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
>   at 
> org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
>   at 
> org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
>   at 
> org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
>   at 
> org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}
> The same thing for ConsumerTemplate which should also be injectable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CAMEL-9798) camel-cdi - Add support for injecting default ProducerTemplate

2016-04-02 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-9798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-9798:
---
Assignee: Antonin Stefanutti

> camel-cdi - Add support for injecting default ProducerTemplate
> --
>
> Key: CAMEL-9798
> URL: https://issues.apache.org/jira/browse/CAMEL-9798
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-cdi
>Affects Versions: 2.17.0
>Reporter: Claus Ibsen
>Assignee: Antonin Stefanutti
>
> We should be able to inject a default producer template using
> {code}
> @Inject
> private ProducerTemplate template;
> {code}
> Currently that does not work and you get an error (see below)
> But if you setup a default endpoint with @Uri it works
> {code}
> @Inject @Uri("file:target/inbox")
> private ProducerTemplate template;
> {code}
> The error you get
> {code}
> org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied 
> dependencies for type ProducerTemplate with qualifiers @Default
>   at injection point [BackedAnnotatedField] @Inject private 
> camelinaction.FirstTest.template
>   at camelinaction.FirstTest.template(FirstTest.java:0)
> WELD-001475: The following beans match by type, but none have matching 
> qualifiers:
>   - Producer Method [ProducerTemplate] with qualifiers [@Excluded @Any] 
> declared as [[UnbackedAnnotatedMethod] @Produces @Excluded private static 
> org.apache.camel.cdi.CdiCamelFactory.producerTemplate(InjectionPoint, @Any 
> Instance, CdiCamelExtension)],
>   - Producer Method [ProducerTemplate] with qualifiers [@Excluded @Any] 
> declared as [[UnbackedAnnotatedMethod] @Produces @Excluded private static 
> org.apache.camel.cdi.CdiCamelFactory.producerTemplate(InjectionPoint, @Any 
> Instance, CdiCamelExtension)]
>   at 
> org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
>   at 
> org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
>   at 
> org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
>   at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
>   at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
>   at 
> org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
>   at 
> org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
>   at 
> org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
>   at 
> org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}
> The same thing for ConsumerTemplate which should also be injectable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)