Issue Details (XML | Word | Printable)

Key: MULE-714
Type: Patch submission Patch submission
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andrew Perepelytsya
Reporter: Andrew Perepelytsya
Votes: 3
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
Mule

Support read queries for outbound JDBC

Created: 21/Mar/06 10:13 AM   Updated: 02/Dec/08 04:58 AM
Component/s: Transport: JDBC
Affects Version/s: 1.3-rc1
Fix Version/s: 1.4.5

Time Tracking:
Not Specified

File Attachments: 1. Text File JdbcMessageDispatcher.patch (5 kB)
2. Zip Archive provider-jdbc.zip (4 kB)

Issue Links:
Related

Labels:
User impact: Low


 Description  « Hide
At the moment outbound JDBC statements could be writes (inserts) or updates/deletes only. In case when one would like to chain JDBC there's no way to do a select other than writing a custom component.

Juan Sanmarco had some working code which could be used:

http://article.gmane.org/gmane.comp.java.mule.user/3700/match=jdbc+connector+question



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Juan Manuel Sanmarco added a comment - 23/Mar/06 12:54 PM
Andrew, this is my final version of the jdbc provider.As specified at http://www.nabble.com/forum/ViewPost.jtp?post=3534046&framed=y , if you specify a property named BeanClassName in the endpoint, the dispatcher will try to return a BeanListHandler instead of a MapListHandler.
Regards,
Juan Manuel

Holger Hoffstaette added a comment - 30/Oct/06 07:44 AM

Seon Lee added a comment - 12/Jan/07 12:53 PM
I recently needed to include an SQL read (select statement) as part of a Bridged sequence.

JMS -> JDBC select -> FTP upload

And I could not have done it without making some changes to the JdbcMessageDispatcher, since by default it expects only write actions on an outbound endpoint.

Using Juan's code as a starting point, I've made changes to the latest dispatcher in trunk and am posting a diff file for anyone else interested. The patch file is against revision: 4648 in trunk.

This patch modifies the dispatcher to allow read jdbc on outbound endpoints. Here is a sample config.xml snippet that uses it.

<mule-descriptor name="JdbcDemoUMO" implementation="org.mule.components.simple.BridgeComponent">
<inbound-router>
<endpoint address="jms://topic:new.accounts" transformers="JMSMessageToObject"/>
</inbound-router>

<outbound-router>
<router className="org.mule.routing.outbound.ChainingRouter">
<endpoint address="jdbc://getAccountById"/>
<endpoint address="ftp://user:pass@hostname/" transformers="ObjectToXml">
<properties>
<property name="outputPattern" value="Data_${SYSTIME}"/>
<property name="passive" value="true"/>
<property name="binary" value="false"/>
<property name="validateConnections" value="true"/>
</properties>
</endpoint>
</router>
</outbound-router>
</mule-descriptor>


Neil Ellis added a comment - 19/Sep/07 09:18 AM
Looking at the patch and the codebase it would appear this patch has already been added. Can someone close this (I can't).

Alan Cassar added a comment - 19/Sep/07 09:55 AM
I am handling this, I have already added most of the stuff but I would like to add some more.

Cheers


Dirk Olmes added a comment - 31/Jan/08 03:28 AM
descoping from 1.4.4 release

Kynan Fraser added a comment - 24/Jul/08 11:23 PM
What is the status on this issue? Are read queries supported on outbound endpoints already?

Ross Mason added a comment - 30/Nov/08 04:35 AM
bumping this up to the 2.x backlg to give it some visibility. This may alrready be supported in the JDBC EE connector

Andrew Perepelytsya added a comment - 01/Dec/08 09:00 AM
It is supported in ee connector, as well as stored procedure calls.

Tomas Blohm added a comment - 02/Dec/08 04:58 AM
So, will this only be available in the EE connector?
It seems natural to make it available for CE since it's originally submitted by the community.

/Tomas