Back Home

<?xml version="1.0" encoding="UTF-8"?>
 
<mule xmlns:neo4j="http://www.mulesoft.org/schema/mule/neo4j" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:json="http://www.mulesoft.org/schema/mule/json" 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.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/neo4j http://www.mulesoft.org/schema/mule/neo4j/3.4/mule-neo4j.xsd">
	<spring:beans>
		<spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
			<spring:property name="driverClassName" value="org.apache.derby.jdbc.ClientDriver" />
			<spring:property name="url" value="jdbc:derby://localhost:1527/RightsData" />
			<spring:property name="username" value="admin" />
			<spring:property name="password" value="admin" />
		</spring:bean>
		<spring:bean id="dbcpDataSource" class="org.apache.commons.dbcp.BasicDataSource">
			<spring:property name="driverClassName" value="org.apache.derby.jdbc.ClientDriver" />
			<spring:property name="url" value="jdbc:derby://localhost:1527/RightsData" />
			<spring:property name="username" value="admin" />
			<spring:property name="password" value="admin" />
		</spring:bean>
	</spring:beans>
 
	<jdbc-ee:connector name="Database" dataSource-ref="dbcpDataSource" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database" />
    <neo4j:config name="Neo4j" doc:name="Neo4j">
        <neo4j:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
    </neo4j:config>
	<flow name="jdbcFlow2" doc:name="jdbcFlow2">
		<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" />
		<choice doc:name="Choice">
			<when expression="INBOUND:http.request.path=/favicon.ico" evaluator="header">
				<set-property value="200" propertyName="http.status" doc:name="Property" />
			</when>
            <otherwise>
                <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="PURCHASE_ID" queryTimeout="-1" connector-ref="Database" doc:name="Database">
                    <jdbc-ee:query key="PURCHASE_ID" value="select * from PURCHASE_PLAY WHERE Purchase_id = 11344"/>
                </jdbc-ee:outbound-endpoint>
                <neo4j:create-node config-ref="Neo4j" doc:name="Neo4j">
                    <neo4j:properties ref="#[payload[0]]"/>
                </neo4j:create-node>
                <scripting:component doc:name="Groovy">
                    <scripting:script engine="Groovy"><![CDATA[import org.mule.modules.neo4j.model.Node
 
Node myNode = payload
System.err.println "Created node with id: " + myNode.getId()
]]></scripting:script>
                </scripting:component>
            </otherwise>
		</choice>
	</flow>
</mule>
 
mule_databases.txt · Last modified: 2013/11/27 02:45 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd