I am fairly new to websphere ESB. I have a JMS export and an outbound JDBC adapter. I have request and response mediation flows. The request from export to the adapter works fine but I have code that need to be executed on response and so i have a response flow. But my code never goes to the response mediation flow. Is there some setting on properties that need to be enabled to execute the mediation flow? I have tried to poke but could not find anything? please advise.
The first thing I would check is that the interface for the JDBC outbound call is 2 way (has a request and response/ an input and an output). If it is a one-way interface then there will not be a response flow.
I presume it is a 2-way because you state that you have a response mediation flow and presumably an "input response node" on the left of the mediation flow editor that represents the return from the adapter. So the primitives wired to the input response node are not being executed, and no response message sent via JMS ?
Are there any errors in the logs (SystemOut/Err.log) ?
The database is updated successfully ?
I did some testing with my interface and I found out that when JDBC Adapter throws an exception( SQL exception of unique constraint, in my case) it does not go to the response flow. In the case of a successful operation, it does go to the response flow. But my main aim was to capture the exception and route it a different way. Like capturing the error and if it was a unique constraint error, I would send it as a update request. I have the screen shots of the mediation flow are in the attached document.
I would certainly expect at least one of the out/fail terminals of the input_response node to fire.
What versions of the runtime and adapters are you using?
Perhaps run with this trace on "*=info:com.ibm.ws.sibx.*=fine:com.ibm.j2ca.*=all" (go to Troubleshooting > Logs and Trace -> server1->Change Log Detail Levels), save config, restart and then attach the trace.log showing the behaviour to this thread.
By the way, the 6.2 JDBC adapter supports exists operation -using this to check for uniqueness is a better practice if the intention is to do an update if the record already exists.