Advertisement
Guest User

dynamic query example

a guest
Apr 8th, 2013
849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.80 KB | None | 0 0
  1.  
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
  4. http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
  5. http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
  6. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
  7. http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
  8.     <jms:activemq-connector name="Active_MQ" specification="1.1" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/>
  9.     <jdbc-ee:oracle-data-source name="oracle" user="CDF" password="CDF" url="jdbc:oracle:thin:@//localhost:1521/xe" transactionIsolation="UNSPECIFIED" doc:name="Oracle Data Source"/>
  10.     <jdbc-ee:connector name="oracle_connector" dataSource-ref="oracle" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/>
  11.     <flow name="CDF_getterFlow1" doc:name="CDF_getterFlow1">
  12.         <jms:inbound-endpoint queue="cdfquery.in" connector-ref="Active_MQ" doc:name="JMS"/>
  13.         <set-variable variableName="query" value="SELECT * FROM your_table" doc:name="Variable"/>
  14.         <outbound-endpoint address="jdbc://#[flowVars['query']]" exchange-pattern="request-response" doc:name="Generic"/>
  15.         <logger message="JDBC QUERY RESULT: #[payload]" level="INFO" doc:name="Logger"/>
  16.     </flow>
  17. </mule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement