Re: Clarification on how Converters work with CDI

2016-04-14 Thread Antonin Stefanutti
> On 13 Apr 2016, at 14:08, Anton wrote: > > On Wed, Apr 13, 2016 at 1:58 PM, John D. Ament > wrote: > >> The JPA component doesn't do any type conversion (based on code >> inspection). It assumes the object coming in is the right type. Good >> catch on adding the converter to the body. >>

Re: Clarification on how Converters work with CDI

2016-04-13 Thread Anton
On Wed, Apr 13, 2016 at 1:58 PM, John D. Ament wrote: > The JPA component doesn't do any type conversion (based on code > inspection). It assumes the object coming in is the right type. Good > catch on adding the converter to the body. > Thanks John I think it would be good to have some consi

Re: Clarification on how Converters work with CDI

2016-04-13 Thread John D. Ament
The JPA component doesn't do any type conversion (based on code inspection). It assumes the object coming in is the right type. Good catch on adding the converter to the body. John On Wed, Apr 13, 2016 at 7:18 AM Antonin Stefanutti wrote: > Yes, I haven’t checked the code though I guess the J

Re: Clarification on how Converters work with CDI

2016-04-13 Thread Antonin Stefanutti
Yes, I haven’t checked the code though I guess the JPA component isn’t doing the conversion automatically. Maybe that could be an enhancement to the JPA component. Antonin > On 13 Apr 2016, at 13:15, Anton wrote: > > When I add the following it works > On Wed, Apr 13, 2016 at 1:04 PM, Antonin

Re: Clarification on how Converters work with CDI

2016-04-13 Thread Anton
When I add the following it works On Wed, Apr 13, 2016 at 1:04 PM, Antonin Stefanutti wrote: > .convertBodyTo(SupportRequest.class) > And it doesnt when this is not included.

Re: Clarification on how Converters work with CDI

2016-04-13 Thread Antonin Stefanutti
Hi Anton, And just to be sure this is a Camel CDI problem, could you add a: convertBodyTo(SupportRequest.class) in your Camel route, like: public void configure() { from(ticketEndpoint) // returns a Ticket .convertBodyTo(SupportRequest.class) .to("jpa:my.domain.SupportRequest&persiste

Re: Clarification on how Converters work with CDI

2016-04-13 Thread Antonin Stefanutti
Hi Anto, Type converter annotated with @Converter are automatically discovered by Camel CDI and added to the Camel context. You can find an example here: https://github.com/apache/camel/blob/337a6756480354afea7531a1a4216de9d232f211/components/camel-cdi/src/test/java/org/apache/camel/cdi/convert

Re: Clarification on how Converters work with CDI

2016-04-13 Thread Anton
Hi John Thanks for your reply. Im using Weld. Im using Camel 2.17.0 My beans.xml looks like this: I tried adding AppScoped, but it did not make any difference.

Re: Clarification on how Converters work with CDI

2016-04-13 Thread John D. Ament
Hi Anton, Just wondering, what does your deployment look like? Weld? OWB? Versions? Does your beans.xml use default discovery mode? Is it empty? Are you using all? If you're not sure f these, could you try adding a scope, e.g. @ApplicationScoped to the converter and try again? John On Wed, Apr