camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: [SQL COMPONENTE] CamelSqlGeneratedKeyRows has a bug?
Date Thu, 08 Jan 2015 15:16:04 GMT
Hi

See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Rule of thumb, dont use out.

On Thu, Jan 8, 2015 at 3:37 PM, fabrizio.spataro
<fabrizio.spataro@bizmate.it> wrote:
> Hello,
>
> So.. is it a bug? I haven't any information about generated keys (OUT
> Message is null)
>
> this is my code:
>
> <spring DSL>
>
> <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>         <camel:restConfiguration bindingMode="auto" component="jetty"
> host="0.0.0.0" port="8080"/>
>           <camel:rest path="/api">
>              <camel:get uri="/doIt" produces="application/json">
>                 <camel:route>
>                    <setHeader headerName="CamelSqlRetrieveGeneratedKeys">
>                         <constant>true</constant>
>                    </setHeader>
>                                 <setBody>
>                                         <constant>
>
>                                                 insert into company (id, name, description,
email) values (0,
> 'myName', '', 'hello@camel.com')
>                                         </constant>
>                                 </setBody>
>                                 <to uri="log:executing query?showAll=true&amp;multiline=true"/>
>
>                                 <to uri="jdbc://mysql" />
>
>                                 <setBody>
>                                         <simple>${out.header.CamelSqlGeneratedKeyRows}</simple>
>                                 </setBody>
>                   </camel:route>
>                  </camel:get>
>         </camel:rest>
>
>   </camel:camelContext>
>
> I had attach full example code package RetrieveGeneratedKey.zip
> <http://camel.465427.n5.nabble.com/file/n5761460/RetrieveGeneratedKey.zip>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/SQL-COMPONENT-CamelSqlGeneratedKeyRows-has-a-bug-tp5761113p5761460.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message