Skip to content

Instantly share code, notes, and snippets.

@pentreathm
Created January 25, 2012 18:50
Show Gist options
  • Save pentreathm/1677877 to your computer and use it in GitHub Desktop.
Save pentreathm/1677877 to your computer and use it in GitHub Desktop.
JDBC example flow
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="CE-3.2.1" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/current/mule-jdbc.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/3.1/mule-scripting.xsd ">
<jdbc:connector name="jdbcConnector" dataSource-ref="MySQL_Data_Source" validateConnections="false" transactionPerMessage="true" queryTimeout="10" pollingFrequency="10000" doc:name="JDBC">
<jdbc:query key="Users" value="SELECT * FROM Users"/>
</jdbc:connector>
<jdbc:mysql-data-source name="MySQL_Data_Source" user="root" password="" url="jdbc:mysql://localhost:3306/StudioQA" transactionIsolation="UNSPECIFIED" doc:name="MySQL Data Source"/>
<flow name="flows1Flow1" doc:name="flows1Flow1">
<jdbc:inbound-endpoint queryKey="Users" connector-ref="jdbcConnector" doc:name="JDBC"/>
<mulexml:object-to-xml-transformer doc:name="Object-to-Xml"/>
<file:outbound-endpoint path="/Users/myUser/myFolder" doc:name="File"/>
</flow>
</mule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment