Hi.

I'm using Camel SqlComponent, and I have a problem.

I want to get a last_insert_id, and my route is here.
TEST_TBL has auto_increment primary key.

<route>
    <from uri="direct:foo" />
    <to uri="sql:INSERT INTO TEST_TBL (INSERT_DATE)
VALUES(NOW())?dataSource=dataSource" />
    <to uri="sql:SELECT LAST_INSERT_ID()?dataSource=dataSource" />
</route>

I can't get a id that I expected in this route, because "INSERT" and "SELECT
LAST_INSERT_ID()" are on different endpoints, in other words different
connections.

How can I get id certainly I expected?

Thank you for any help you can provide.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Use-same-db-connection-tp5779853.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to