Announcement Announcement Module
Collapse
No announcement yet.
jdbc:outbound-gateway query only Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment

    Working...
    X