Results 1 to 2 of 2

Thread: jdbc:outbound-gateway query only

  1. #1
    Join Date
    Aug 2010
    Posts
    23

    Default jdbc:outbound-gateway query only

    I have a use-case where a trigger message (containing id) comes through an inbound channel, and then I need to use jdbc:outbound-gateway to execute a query and pass the result to an outbound channel.

    Is it possible to supply just the query property of the gateway without the update property ?

    <jdbc:outbound-gateway query="select * from foo where id = : payload.id"
    request-channel="inChannel" reply-channel="outChannel"
    data-source="dataSource" />

  2. #2
    Join Date
    Aug 2005
    Location
    Atlanta
    Posts
    123

    Default

    Hi,

    Good use-case and something we don't handle handle well, yet. At this point, unfortunately, you have to provide the update query. What you could do is to provide a dummy-update query. This is not ideal but it works. I have created a sample-project that illustrates this.

    Please check it out at:

    https://github.com/ghillert/spring-i...-33/basic/jdbc

    We are aware that this is a very valid use-case. We are still debating how to cleanly solve it (Outbound Gateway versus using an Inbound Gateway). Expect a Jira to be created sometime tomorrow. I will update this thread accordingly.

    Thanks!

    Cheers,

    Gunnar

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •