You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Pascal Klink <pa...@web.de> on 2014/04/21 00:45:32 UTC

JDBC Producer with auto generated keys and named parameters

Hi everyone,
 
I have a question regarding the JDBC producer: Why is the retrieval of auto generated keys not supported when using named parameters?
 
I'm asking because after looking through the code of the producer I could not understand why this was not implemented, since the java.sql.Connection interface provides a method for creating prepared statements which return auto generated keys. Is there any special reason why this feature is not implemented or could this be fixed?
 
If the latter is the case - is it possible for me to provide a fix for this or do I have to open a ticket anywhere?
 
Greetings,
Pascal

Aw: Re: JDBC Producer with auto generated keys and named parameters

Posted by Pascal Klink <pa...@web.de>.
Hi Grzegorz,

Here is the ticket with the attached patch: https://issues.apache.org/jira/browse/CAMEL-7382. I created this patch from the current 2.14 master but I think is should be possible to apply the patch on 2.13 aswell.

But if you can provide me the URL to the 2.13 master I can also create a patch for the 2.13 version.

Greetings,
Pascal
 
 

 > Gesendet: Dienstag, 22. April 2014 um 07:53 Uhr
 > Von: "Grzegorz Grzybek" <gr...@gmail.com>
 > An: users@camel.apache.org
 > Betreff: Re: JDBC Producer with auto generated keys and named parameters
 > Hello Pascal - I recently added this for camel-sql component (see
 > https://issues.apache.org/jira/browse/CAMEL-7313). If you create JIRA
 > ticked w/ patch, I could look at this.
 > 
 > regards
 > Grzegorz Grzybek
 > 
 > 
 > 2014-04-21 0:45 GMT+02:00 Pascal Klink <pa...@web.de>:
 > 
 > > Hi everyone,
 > >
 > > I have a question regarding the JDBC producer: Why is the retrieval of
 > > auto generated keys not supported when using named parameters?
 > >
 > > I'm asking because after looking through the code of the producer I could
 > > not understand why this was not implemented, since the java.sql.Connection
 > > interface provides a method for creating prepared statements which return
 > > auto generated keys. Is there any special reason why this feature is not
 > > implemented or could this be fixed?
 > >
 > > If the latter is the case - is it possible for me to provide a fix for
 > > this or do I have to open a ticket anywhere?
 > >
 > > Greetings,
 > > Pascal
 > >

Re: JDBC Producer with auto generated keys and named parameters

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello Pascal - I recently added this for camel-sql component (see
https://issues.apache.org/jira/browse/CAMEL-7313). If you create JIRA
ticked w/ patch, I could look at this.

regards
Grzegorz Grzybek


2014-04-21 0:45 GMT+02:00 Pascal Klink <pa...@web.de>:

> Hi everyone,
>
> I have a question regarding the JDBC producer: Why is the retrieval of
> auto generated keys not supported when using named parameters?
>
> I'm asking because after looking through the code of the producer I could
> not understand why this was not implemented, since the java.sql.Connection
> interface provides a method for creating prepared statements which return
> auto generated keys. Is there any special reason why this feature is not
> implemented or could this be fixed?
>
> If the latter is the case - is it possible for me to provide a fix for
> this or do I have to open a ticket anywhere?
>
> Greetings,
> Pascal
>

Re: JDBC Producer with auto generated keys and named parameters

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah we love contributions, read here
http://camel.apache.org/contributing

So you are welcome to log a JIRA ticket and work on a patch to implement this.



On Mon, Apr 21, 2014 at 12:45 AM, Pascal Klink <pa...@web.de> wrote:
> Hi everyone,
>
> I have a question regarding the JDBC producer: Why is the retrieval of auto generated keys not supported when using named parameters?
>
> I'm asking because after looking through the code of the producer I could not understand why this was not implemented, since the java.sql.Connection interface provides a method for creating prepared statements which return auto generated keys. Is there any special reason why this feature is not implemented or could this be fixed?
>
> If the latter is the case - is it possible for me to provide a fix for this or do I have to open a ticket anywhere?
>
> Greetings,
> Pascal



-- 
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/