Skip to content

Instantly share code, notes, and snippets.

@germanrsolis
Created October 21, 2011 00:19
Show Gist options
  • Save germanrsolis/1302781 to your computer and use it in GitHub Desktop.
Save germanrsolis/1302781 to your computer and use it in GitHub Desktop.
JDBC - External Queries - 3
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/3.1/mule-jdbc-ee.xsd">
<context:property-placeholder location="jdbc.properties"/>
<!-- Include the file containing the statements -->
<beans:beans >
<beans:import resource="mule-config-extras.xml"/>
</beans:beans>
<jdbc:connector dataSource-ref="jdbcDataSource" name="jdbcConnector" >
<jdbc:query key="selectQuery" value-ref="formatedQuery" />
</jdbc:connector>
<flow name="testFlow">
<http:inbound-endpoint host="localhost" path="test" port="9999" />
<jdbc:outbound-endpoint queryKey="selectQuery" exchange-pattern="request-response"/>
</flow>
</mule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment