Author: indika
Date: Wed May 21 01:22:33 2008
New Revision: 17213
Log:
include sample 363
Added:
branches/esb/java/1.7/esb/java/repository/conf/sample/synapse_sample_363.xml
Modified:
branches/esb/java/1.7/esb/java/modules/distribution/src/main/assembly/bin.xml
branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/synapse.properties
Modified:
branches/esb/java/1.7/esb/java/modules/distribution/src/main/assembly/bin.xml
==============================================================================
---
branches/esb/java/1.7/esb/java/modules/distribution/src/main/assembly/bin.xml
(original)
+++
branches/esb/java/1.7/esb/java/modules/distribution/src/main/assembly/bin.xml
Wed May 21 01:22:33 2008
@@ -88,9 +88,18 @@
<exclude>web.xml</exclude>
<exclude>tomcat</exclude>
<exclude>tomcat/*</exclude>
+ <exclude>synapse.properties</exclude>
</excludes>
</fileSet>
<fileSet>
+ <directory>src/main/conf</directory>
+ <outputDirectory>wso2esb-${wso2.esb.version}/webapp/WEB-INF/classes
+ </outputDirectory>
+ <includes>
+ <include>synapse.properties</include>
+ </includes>
+ </fileSet>
+ <fileSet>
<directory>target/temp/docs</directory>
<outputDirectory>wso2esb-${wso2.esb.version}/docs</outputDirectory>
</fileSet>
Modified:
branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/synapse.properties
==============================================================================
---
branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/synapse.properties
(original)
+++
branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/synapse.properties
Wed May 21 01:22:33 2008
@@ -23,3 +23,31 @@
synapse.threads.qlen = 10
synapse.threads.group = synapse-thread-group
synapse.threads.idprefix = SynapseWorker
+
+#synapse.datasources=lookupds,reportds
+#synapse.datasources.icFactory=com.sun.jndi.rmi.registry.RegistryContextFactory
+#synapse.datasources.providerUrl=rmi://localhost:2199
+#synapse.datasources.providerPort=2199
+#
+#synapse.datasources.lookupds.type=BasicDataSource
+#synapse.datasources.lookupds.driverClassName=org.apache.derby.jdbc.ClientDriver
+#synapse.datasources.lookupds.url=jdbc:derby://localhost:1527/lookupdb;create=false
+#synapse.datasources.lookupds.username=esb
+#synapse.datasources.lookupds.password=esb
+#synapse.datasources.lookupds.dsName=lookupdb
+#synapse.datasources.lookupds.maxActive=100
+#synapse.datasources.lookupds.maxIdle=20
+#synapse.datasources.lookupds.maxWait=10000
+#
+#synapse.datasources.reportds.type=PerUserPoolDataSource
+#synapse.datasources.reportds.cpdsadapter.factory=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
+#synapse.datasources.reportds.cpdsadapter.className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
+#synapse.datasources.reportds.cpdsadapter.name=cpds
+#synapse.datasources.reportds.dsName=reportdb
+#synapse.datasources.reportds.driverClassName=org.apache.derby.jdbc.ClientDriver
+#synapse.datasources.reportds.url=jdbc:derby://localhost:1527/reportdb;create=false
+#synapse.datasources.reportds.username=esb
+#synapse.datasources.reportds.password=esb
+#synapse.datasources.reportds.maxActive=100
+#synapse.datasources.reportds.maxIdle=20
+#synapse.datasources.reportds.maxWait=10000
Added:
branches/esb/java/1.7/esb/java/repository/conf/sample/synapse_sample_363.xml
==============================================================================
--- (empty file)
+++
branches/esb/java/1.7/esb/java/repository/conf/sample/synapse_sample_363.xml
Wed May 21 01:22:33 2008
@@ -0,0 +1,165 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<!-- Reusable database connection pool -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+
+ <sequence name="myFaultHandler">
+ <makefault>
+ <code value="tns:Receiver"
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason expression="get-property('ERROR_MESSAGE')"/>
+ </makefault>
+
+ <property name="RESPONSE" value="true"/>
+ <header name="To" expression="get-property('ReplyTo')"/>
+ <send/>
+ <drop/>
+ </sequence>
+
+ <sequence name="main" onError="myFaultHandler">
+ <in>
+ <log level="custom">
+ <property name="text"
+ value="** Looking up from the Database **"/>
+ </log>
+ <dblookup>
+ <connection>
+ <pool>
+ <dsName>lookupdb</dsName>
+
<icClass>com.sun.jndi.rmi.registry.RegistryContextFactory</icClass>
+ <url>rmi://localhost:2199</url>
+ <user>esb</user>
+ <password>esb</password>
+ </pool>
+ </connection>
+ <statement>
+ <sql>select * from company where name =?</sql>
+ <parameter expression="//m0:getQuote/m0:request/m0:symbol"
+ xmlns:m0="http://services.samples/xsd"
type="VARCHAR"/>
+ <result name="company_id" column="id"/>
+ </statement>
+ </dblookup>
+
+ <switch source="get-property('company_id')">
+ <case regex="c1">
+ <log level="custom">
+ <property name="text"
+ expression="fn:concat('Company ID -
',get-property('company_id'))"/>
+ </log>
+ <send>
+ <endpoint>
+ <address
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ </case>
+ <case regex="c2">
+ <log level="custom">
+ <property name="text"
+ expression="fn:concat('Company ID -
',get-property('company_id'))"/>
+ </log>
+ <send>
+ <endpoint>
+ <address
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ </case>
+ <case regex="c3">
+ <log level="custom">
+ <property name="text"
+ expression="fn:concat('Company ID -
',get-property('company_id'))"/>
+ </log>
+ <send>
+ <endpoint>
+ <address
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ </case>
+ <default>
+ <log level="custom">
+ <property name="text" value="** Unrecognized Company
ID **"/>
+ </log>
+ <makefault>
+ <code value="tns:Receiver"
+
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="** Unrecognized Company ID **"/>
+ </makefault>
+ <property name="RESPONSE" value="true"/>
+ <header name="To" action="remove"/>
+ <send/>
+ <drop/>
+ </default>
+ </switch>
+ <drop/>
+ </in>
+
+ <out>
+ <log level="custom">
+ <property name="text"
+ value="** Reporting to the Database **"/>
+ </log>
+ <dbreport>
+ <connection>
+ <pool>
+ <dsName>reportdb</dsName>
+
<icClass>com.sun.jndi.rmi.registry.RegistryContextFactory</icClass>
+ <url>rmi://localhost:2199</url>
+ <user>esb</user>
+ <password>esb</password>
+ </pool>
+ </connection>
+ <statement>
+ <sql>update company set price=? where name =?</sql>
+ <parameter expression="//m0:return/m0:last/child::text()"
+ xmlns:m0="http://services.samples/xsd"
type="DOUBLE"/>
+ <parameter expression="//m0:return/m0:symbol/child::text()"
+ xmlns:m0="http://services.samples/xsd"
type="VARCHAR"/>
+ </statement>
+ </dbreport>
+ <log level="custom">
+ <property name="text"
+ value="** Looking up from the Database **"/>
+ </log>
+ <dblookup>
+ <connection>
+ <pool>
+ <dsName>reportdb</dsName>
+
<icClass>com.sun.jndi.rmi.registry.RegistryContextFactory</icClass>
+ <url>rmi://localhost:2199</url>
+ <user>esb</user>
+ <password>esb</password>
+ </pool>
+ </connection>
+ <statement>
+ <sql>select * from company where name =?</sql>
+ <parameter expression="//m0:return/m0:symbol/child::text()"
+ xmlns:m0="http://services.samples/xsd"
type="VARCHAR"/>
+ <result name="stock_price" column="price"/>
+ </statement>
+ </dblookup>
+ <log level="custom">
+ <property name="text"
+ expression="fn:concat('Stock price -
',get-property('stock_price'))"/>
+ </log>
+ <send/>
+
+ </out>
+
+ </sequence>
+
+</definitions>
\ No newline at end of file
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev