Skip to content

Instantly share code, notes, and snippets.

@germanrsolis
germanrsolis / JDBC_ExternalQueries_1
Created October 21, 2011 00:15
JDBC - External Queries - 1
<jdbc:connector name="jdbcConnector" dataSource-ref="jdbcDataSource">
<jdbc:query key="sqlQuery" value="SELECT * FROM TEST"/>
</jdbc:connector>
@germanrsolis
germanrsolis / JDBC_ExternalQueries_2
Created October 21, 2011 00:17
JDBC - External Queries - 2
<?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:spring-security="http://www.mulesoft.org/schema/mule/spring-security"
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/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.1/mule-spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
@germanrsolis
germanrsolis / JDBC_ExternalQueries_3
Created October 21, 2011 00:19
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
@germanrsolis
germanrsolis / gist:1407027
Created November 29, 2011 23:01
xa-gist-1
<mule xmlns:jbossts="http://www.mulesoft.org/schema/mule/jbossts"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/jbossts http://www.mulesoft.org/schema/mule/jbossts/3.2/mule-jbossts.xsd">
<jbossts:transaction-manager />
@germanrsolis
germanrsolis / gist:1416714
Created December 1, 2011 13:27
xa-gist-2
<spring:beans>
<spring:bean id="oraDataSource" class="oracle.ucp.jdbc.PoolXADataSourceImpl">
<spring:property name="URL" value="${jdbc.url}" />
<spring:property name="user" value="${jdbc.user}" />
<spring:property name="password" value="${jdbc.pass}" />
<spring:property name="connectionFactoryClassName"
value="oracle.jdbc.xa.client.OracleXADataSource" />
<spring:property name="minPoolSize" value="10" />
<spring:property name="maxPoolSize" value="20" />
<spring:property name="connectionWaitTimeout" value="30" />
@germanrsolis
germanrsolis / gist:1416722
Created December 1, 2011 13:27
xa-gist-3
<jdbc:connector name="jdbcConnectorSource"
dataSource-ref="mySqlDataSource">
<jdbc:query key="selectQuery" value-ref="dbQuerySql" />
</jdbc:connector>
<jdbc:connector name="jdbcConnectorDest"
dataSource-ref="oraDataSource">
<jdbc:query key="insert_call" value="CALL INSERT_FIELD ('test')" />
</jdbc:connector>
@germanrsolis
germanrsolis / gist:1416807
Created December 1, 2011 13:42
xa-gist-4
<?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:spring="http://www.springframework.org/schema/beans" xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:test="http://www.mulesoft.org/schema/mule/test" xmlns:client="http://www.mulesoft.org/schema/mule/client"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:management="http://www.mulesoft.org/schema/mule/management"
xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
xmlns:sxc="http://www.mulesoft.org/schema/mule/sxc" xmlns:mule-xml="http://www.mulesoft.org/schema/mule/xml"
xmlns:context="http://www.springframework.org/schema/context"
@germanrsolis
germanrsolis / gist:1417283
Created December 1, 2011 14:48
xa-gist-5
<jdbc:inbound-endpoint queryKey="selectQuery"
connector-ref="jdbcConnectorSource" pollingFrequency="10000">
<xa-transaction action="ALWAYS_BEGIN" />
</jdbc:inbound-endpoint>
@germanrsolis
germanrsolis / gist:1417287
Created December 1, 2011 14:49
xa-gist-6
<jdbc:outbound-endpoint queryKey="insert_call"
connector-ref="jdbcConnectorDest">
<xa-transaction action="ALWAYS_JOIN" />
</jdbc:outbound-endpoint>
<all>
<flow-ref name="flow1" />
</all>
</flow>
<flow name="flow1">
<outbound-endpoint ref="outbound" />
</flow>