You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/03/23 17:00:54 UTC
svn commit: r388195 - in
/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe:
./ src/ src/bpe-su/ src/client/ src/components/ src/components/loanbroker/
src/lw-su/ src/sa/ src/sa/META-INF/
Author: gnodet
Date: Thu Mar 23 08:00:51 2006
New Revision: 388195
URL: http://svn.apache.org/viewcvs?rev=388195&view=rev
Log:
SM-365: Create a simple loan broker demo based on servicemix-bpe
This is just a nice packaging of the junit tests
Added:
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/README.txt
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/build.xml
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/servicemix.xml
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/bank.wsdl
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/creditagency.wsdl
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.bpel
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.wsdl
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/client/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/client/JMSClient.java
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/Bank.java
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/CreditAgency.java
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/lw-su/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/lw-su/servicemix.xml
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/DISCLAIMER.txt
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/LICENSE.txt
incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/jbi.xml
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/README.txt
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/README.txt?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/README.txt (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/README.txt Thu Mar 23 08:00:51 2006
@@ -0,0 +1,16 @@
+Welcome to the LoanDemo Example
+=============================================
+
+This example is based on the great EIP book (http://www.enterpriseintegrationpatterns.com/ComposedMessagingExample.html).
+The client and components are built and run from source using Ant, http://ant.apache.org.
+
+To start the servicemix server using the sample configuration, you must enter the following commands:
+
+ant setup
+../../bin/servicemix servicemix.xml
+
+This will start the loan broker component.
+
+A simple JMS client based on lingo (http://lingo.codehaus.org/) is provided.
+Just execute 'ant' from the current directory to run the JMS client.
+
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/build.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/build.xml?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/build.xml (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/build.xml Thu Mar 23 08:00:51 2006
@@ -0,0 +1,95 @@
+<project name="jms-binding" default="run" basedir=".">
+
+ <property name="build.dir" value="build"/>
+ <property name="comp.build.dir" value="${build.dir}/components"/>
+ <property name="client.build.dir" value="${build.dir}/client"/>
+
+ <property name="src.dir" value="src"/>
+ <property name="comp.src.dir" value="${src.dir}/components"/>
+ <property name="client.src.dir" value="${src.dir}/client"/>
+ <property name="su.bpe.src.dir" value="${src.dir}/bpe-su"/>
+ <property name="su.lw.src.dir" value="${src.dir}/lw-su"/>
+ <property name="sa.src.dir" value="${src.dir}/sa"/>
+
+ <target name="clean">
+ <delete dir="target" quiet="true"/>
+ <delete dir="${build.dir}" quiet="true"/>
+ </target>
+
+ <target name="init">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${comp.build.dir}"/>
+ <mkdir dir="${client.build.dir}"/>
+
+ <path id="javac.classpath">
+ <pathelement path="${comp.build.dir}"/>
+ <pathelement path="${client.build.dir}"/>
+ <pathelement path="../../conf"/>
+ <fileset dir="../../lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="../..">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ </target>
+
+ <target name="build-components" depends="init" description="Build components">
+ <javac srcdir="${comp.src.dir}" destdir="${comp.build.dir}" debug="on" source="1.4" target="1.4">
+ <classpath refid="javac.classpath"/>
+ </javac>
+ </target>
+
+ <target name="build-lw-su" depends="build-components" description="Build the engine service unit">
+ <zip destfile="${build.dir}/lw-su.zip">
+ <fileset dir="${comp.build.dir}"/>
+ <fileset dir="${su.lw.src.dir}"/>
+ </zip>
+ </target>
+
+ <target name="build-bpe-su" depends="init" description="Build the bpe service unit">
+ <zip destfile="${build.dir}/bpe-su.zip">
+ <fileset dir="${su.bpe.src.dir}"/>
+ </zip>
+ </target>
+
+ <target name="build-sa" depends="build-bpe-su, build-lw-su" description="Build the service assembly">
+ <zip destfile="${build.dir}/bpe-demo-sa.zip">
+ <fileset dir="${build.dir}" includes="bpe-su.zip"/>
+ <fileset dir="${build.dir}" includes="lw-su.zip"/>
+ <fileset dir="${sa.src.dir}"/>
+ </zip>
+ </target>
+
+ <target name="setup" depends="build-sa" description="Setup servicemix">
+ <mkdir dir="install"/>
+ <mkdir dir="deploy"/>
+ <copy todir="install">
+ <fileset dir="../../components" includes="*bpe*"/>
+ <fileset dir="../../components" includes="*lwcontainer*"/>
+ </copy>
+ <copy file="${build.dir}/bpe-demo-sa.zip" todir="deploy"/>
+ </target>
+
+ <target name="build-client" depends="init" description="Build components">
+ <javac srcdir="${client.src.dir}" destdir="${client.build.dir}" debug="on" source="1.4" target="1.4">
+ <classpath refid="javac.classpath"/>
+ </javac>
+ </target>
+
+ <target name="run" depends="build-client" description="Runs the example client">
+ <echo>Running exsample client</echo>
+ <java classname="JMSClient" fork="yes" maxmemory="100M">
+ <classpath refid="javac.classpath"/>
+ </java>
+ </target>
+
+ <target name="run-loop" depends="build-client" description="Runs the example client">
+ <echo>Running exsample client</echo>
+ <java classname="JMSClient" fork="yes" maxmemory="100M">
+ <classpath refid="javac.classpath"/>
+ <arg value="100000"/>
+ </java>
+ </target>
+
+</project>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/servicemix.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/servicemix.xml?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/servicemix.xml (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/servicemix.xml Thu Mar 23 08:00:51 2006
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0">
+
+ <!-- the JBI container -->
+ <sm:container id="jbi"
+ rootDir="./wdir"
+ installationDirPath="./install"
+ deploymentDirPath="./deploy"
+ flowName="seda">
+
+ <sm:activationSpecs>
+
+ </sm:activationSpecs>
+ </sm:container>
+
+ <!-- message broker -->
+ <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
+ <property name="config" value="classpath:activemq.xml"/>
+ </bean>
+
+</beans>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/bank.wsdl
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/bank.wsdl?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/bank.wsdl (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/bank.wsdl Thu Mar 23 08:00:51 2006
@@ -0,0 +1,48 @@
+<definitions targetNamespace="urn:logicblaze:soa:bank"
+ xmlns:tns="urn:logicblaze:soa:bank"
+ xmlns:typens="urn:logicblaze:soa:bank:types"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+
+ <types>
+ <xsd:schema
+ targetNamespace="urn:logicblaze:soa:bank:types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="getLoanQuoteRequest">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ <xsd:element name="amount" type="xsd:double" />
+ <xsd:element name="duration" type="xsd:int" />
+ <xsd:element name="score" type="xsd:int" />
+ <xsd:element name="length" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="getLoanQuoteResponse">
+ <xsd:sequence>
+ <xsd:element name="rate" type="xsd:double" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <message name="getLoanQuoteRequest">
+ <part name="payload" type="typens:getLoanQuoteRequest" />
+ </message>
+
+ <message name="getLoanQuoteResponse">
+ <part name="payload" type="typens:getLoanQuoteResponse" />
+ </message>
+
+ <portType name="Bank">
+ <operation name="getLoanQuote">
+ <input message="tns:getLoanQuoteRequest" />
+ <output message="tns:getLoanQuoteResponse" />
+ </operation>
+ </portType>
+
+</definitions>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/creditagency.wsdl
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/creditagency.wsdl?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/creditagency.wsdl (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/creditagency.wsdl Thu Mar 23 08:00:51 2006
@@ -0,0 +1,88 @@
+<definitions targetNamespace="urn:logicblaze:soa:creditagency"
+ xmlns:tns="urn:logicblaze:soa:creditagency"
+ xmlns:typens="urn:logicblaze:soa:creditagency:types"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+
+ <types>
+ <xsd:schema
+ targetNamespace="urn:logicblaze:soa:creditagency:types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="getCreditScoreRequest">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="getCreditScoreResponse">
+ <xsd:sequence>
+ <xsd:element name="score" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="getCreditHistoryLengthRequest">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="getCreditHistoryLengthResponse">
+ <xsd:sequence>
+ <xsd:element name="length" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="unknownSSNFault">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <message name="getCreditScoreRequest">
+ <part name="payload" type="typens:getCreditScoreRequest" />
+ </message>
+
+ <message name="getCreditScoreResponse">
+ <part name="payload" type="typens:getCreditScoreResponse" />
+ </message>
+
+ <message name="getCreditHistoryLengthRequest">
+ <part name="payload"
+ type="typens:getCreditHistoryLengthRequest" />
+ </message>
+
+ <message name="getCreditHistoryLengthResponse">
+ <part name="payload"
+ type="typens:getCreditHistoryLengthResponse" />
+ </message>
+
+ <message name="unknownSSNFault">
+ <part name="payload" type="typens:unknownSSNFault" />
+ </message>
+
+ <message name="invalidSSNFault">
+ <part name="payload" type="typens:invalidSSNFault" />
+ </message>
+
+ <portType name="CreditAgency">
+ <operation name="getCreditScore">
+ <input message="tns:getCreditScoreRequest" />
+ <output message="tns:getCreditScoreResponse" />
+ <fault name="UnknownSSN" message="tns:unknownSSNFault" />
+ <fault name="InvalidSSN" message="tns:invalidSSNFault" />
+ </operation>
+ <operation name="getCreditHistoryLength">
+ <input message="tns:getCreditHistoryLengthRequest" />
+ <output message="tns:getCreditHistoryLengthResponse" />
+ <fault name="UnknownSSN" message="tns:unknownSSNFault">
+ </fault>
+ </operation>
+ </portType>
+
+</definitions>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.bpel
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.bpel?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.bpel (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.bpel Thu Mar 23 08:00:51 2006
@@ -0,0 +1,229 @@
+<bpel:process name="loanbrokerProcess"
+ targetNamespace="urn:logicblaze:soa:loanbroker"
+ xmlns:tns="urn:logicblaze:soa:loanbroker"
+ xmlns:ca="urn:logicblaze:soa:creditagency"
+ xmlns:bk="urn:logicblaze:soa:bank"
+ xmlns:svc="urn:logicblaze:soa:service" suppressJoinFailure="yes"
+ xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sm="http://servicemix.apache.org/schemas/bpe/1.0"
+ xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/ http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+
+ <bpel:variables>
+ <bpel:variable name="request" messageType="tns:getLoanQuoteRequest" />
+ <bpel:variable name="response" messageType="tns:getLoanQuoteResponse" />
+ <bpel:variable name="ca-score-request" messageType="ca:getCreditScoreRequest" />
+ <bpel:variable name="ca-score-response" messageType="ca:getCreditScoreResponse" />
+ <bpel:variable name="ca-history-request" messageType="ca:getCreditHistoryLengthRequest" />
+ <bpel:variable name="ca-history-response" messageType="ca:getCreditHistoryLengthResponse" />
+ <bpel:variable name="bk-loanquote-request" messageType="bk:getLoanQuoteRequest" />
+ <bpel:variable name="bk-loanquote-response-1" messageType="bk:getLoanQuoteResponse" />
+ <bpel:variable name="bk-loanquote-response-2" messageType="bk:getLoanQuoteResponse" />
+ <bpel:variable name="bk-loanquote-response-3" messageType="bk:getLoanQuoteResponse" />
+ <bpel:variable name="bk-loanquote-response-4" messageType="bk:getLoanQuoteResponse" />
+ <bpel:variable name="bk-loanquote-response-5" messageType="bk:getLoanQuoteResponse" />
+ <bpel:variable name="invalidSSN" messageType="tns:invalidSSNFault" />
+ <bpel:variable name="unknownSSN" messageType="tns:unknownSSNFault" />
+ </bpel:variables>
+
+ <bpel:faultHandlers>
+ <bpel:catch faultName="ca:InvalidSSN">
+ <bpel:sequence>
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
+ <bpel:to variable="invalidSSN" part="payload" query="/tns:invalidSSNFault/tns:ssn" />
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:reply name="response" partnerLink="LoanBrokerResponse"
+ portType="tns:LoanBroker" operation="getLoanQuote"
+ variable="invalidSSN" faultName="tns:InvalidSSN" >
+ </bpel:reply>
+ </bpel:sequence>
+ </bpel:catch>
+ <bpel:catch faultName="ca:UnkownSSN">
+ <bpel:sequence>
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
+ <bpel:to variable="unknownSSN" part="payload" query="/tns:unknownSSNFault/tns:ssn" />
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:reply name="response" partnerLink="LoanBrokerResponse"
+ portType="tns:LoanBroker" operation="getLoanQuote"
+ variable="unknownSSN" faultName="tns:unknownSSN" >
+ </bpel:reply>
+ </bpel:sequence>
+ </bpel:catch>
+ </bpel:faultHandlers>
+
+ <bpel:sequence>
+ <bpel:receive name="request" partnerLink="LoanBrokerRequest"
+ portType="tns:LoanBroker" operation="getLoanQuote" variable="request"
+ createInstance="yes">
+ </bpel:receive>
+
+
+ <bpel:flow>
+
+ <bpel:sequence>
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
+ <bpel:to variable="ca-history-request" part="payload" query="/ca:getCreditHistoryLengthRequest/ca:ssn" />
+ </bpel:copy>
+ </bpel:assign>
+
+ <bpel:invoke name="service" partnerLink="CreditAgency"
+ portType="ca:CreditAgency" operation="getCreditHistoryLength"
+ inputVariable="ca-history-request"
+ outputVariable="ca-history-response" />
+ </bpel:sequence>
+
+ <bpel:sequence>
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
+ <bpel:to variable="ca-score-request" part="payload" query="/ca:getCreditScoreRequest/ca:ssn" />
+ </bpel:copy>
+ </bpel:assign>
+
+ <bpel:invoke name="service" partnerLink="CreditAgency"
+ portType="ca:CreditAgency" operation="getCreditScore"
+ inputVariable="ca-score-request"
+ outputVariable="ca-score-response" />
+ </bpel:sequence>
+ </bpel:flow>
+
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
+ <bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:ssn"/>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:amount" />
+ <bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:amount"/>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:duration" />
+ <bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:duration"/>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from variable="ca-score-response" part="payload" query="/ca:getCreditScoreResponse/ca:score" />
+ <bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:score"/>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from variable="ca-history-response" part="payload" query="/ca:getCreditHistoryLengthResponse/ca:length" />
+ <bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:length"/>
+ </bpel:copy>
+ </bpel:assign>
+
+ <bpel:switch>
+
+ <bpel:case condition="getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:amount') >= 75000.0 and
+ getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:score') >= 600 and
+ getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:length') >= 8">
+ <bpel:sequence>
+ <bpel:flow>
+ <bpel:invoke name="bank1" partnerLink="Bank1"
+ portType="bk:Bank" operation="getLoanQuote"
+ inputVariable="bk-loanquote-request"
+ outputVariable="bk-loanquote-response-1"
+ sm:endpoint="urn:logicblaze:soa:bank:Bank1:bank" />
+
+ <bpel:invoke name="bank2" partnerLink="Bank2"
+ portType="bk:Bank" operation="getLoanQuote"
+ inputVariable="bk-loanquote-request"
+ outputVariable="bk-loanquote-response-2"
+ sm:endpoint="urn:logicblaze:soa:bank:Bank2:bank" />
+ </bpel:flow>
+ <bpel:switch>
+ <bpel:case condition="getVariableData('bk-loanquote-response-1', 'payload', '/bk:getLoanQuoteResponse/bk:rate') >
+ getVariableData('bk-loanquote-response-2', 'payload', '/bk:getLoanQuoteResponse/bk:rate')">
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from expression="getVariableData('bk-loanquote-response-2', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
+ <bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:case>
+ <bpel:otherwise>
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from expression="getVariableData('bk-loanquote-response-1', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
+ <bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:otherwise>
+ </bpel:switch>
+ </bpel:sequence>
+ </bpel:case>
+
+ <bpel:case condition="getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:amount') >= 10000.0 and
+ getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:amount') < 75000.0 and
+ getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:score') >= 400 and
+ getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:length') >= 3">
+
+ <bpel:sequence>
+ <bpel:flow>
+ <bpel:invoke name="bank3" partnerLink="Bank3"
+ portType="bk:Bank" operation="getLoanQuote"
+ inputVariable="bk-loanquote-request"
+ outputVariable="bk-loanquote-response-3"
+ sm:endpoint="urn:logicblaze:soa:bank:Bank3:bank" />
+
+ <bpel:invoke name="bank4" partnerLink="Bank4"
+ portType="bk:Bank" operation="getLoanQuote"
+ inputVariable="bk-loanquote-request"
+ outputVariable="bk-loanquote-response-4"
+ sm:endpoint="urn:logicblaze:soa:bank:Bank4:bank" />
+ </bpel:flow>
+ <bpel:switch>
+ <bpel:case condition="getVariableData('bk-loanquote-response-3', 'payload', '/bk:getLoanQuoteResponse/bk:rate') >
+ getVariableData('bk-loanquote-response-4', 'payload', '/bk:getLoanQuoteResponse/bk:rate')">
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from expression="getVariableData('bk-loanquote-response-4', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
+ <bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:case>
+ <bpel:otherwise>
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from expression="getVariableData('bk-loanquote-response-3', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
+ <bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:otherwise>
+ </bpel:switch>
+ </bpel:sequence>
+ </bpel:case>
+
+ <bpel:otherwise>
+
+ <bpel:sequence>
+ <bpel:invoke name="bank5" partnerLink="Bank5"
+ portType="bk:Bank" operation="getLoanQuote"
+ inputVariable="bk-loanquote-request"
+ outputVariable="bk-loanquote-response-5"
+ sm:endpoint="urn:logicblaze:soa:bank:Bank5:bank" />
+ <bpel:assign>
+ <bpel:copy>
+ <bpel:from expression="getVariableData('bk-loanquote-response-5', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
+ <bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+ </bpel:copy>
+ </bpel:assign>
+ </bpel:sequence>
+
+ </bpel:otherwise>
+
+ </bpel:switch>
+
+ <bpel:reply name="response" partnerLink="LoanBrokerResponse"
+ portType="tns:LoanBroker" operation="getLoanQuote"
+ variable="response" />
+
+ </bpel:sequence>
+
+</bpel:process>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.wsdl
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.wsdl?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.wsdl (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/bpe-su/loanbroker.wsdl Thu Mar 23 08:00:51 2006
@@ -0,0 +1,95 @@
+<definitions targetNamespace="urn:logicblaze:soa:loanbroker"
+ xmlns:tns="urn:logicblaze:soa:loanbroker"
+ xmlns:typens="urn:logicblaze:soa:loanbroker:types"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+
+ <import namespace="urn:logicblaze:soa:creditagency"
+ location="creditagency.wsdl" />
+
+ <import namespace="urn:logicblaze:soa:bank"
+ location="bank.wsdl" />
+
+ <!-- type defs -->
+ <types>
+ <xsd:schema
+ targetNamespace="urn:logicblaze:soa:loanbroker:types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="getLoanQuoteRequest">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ <xsd:element name="amount" type="xsd:double" />
+ <xsd:element name="duration" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="getLoanQuoteResponse">
+ <xsd:sequence>
+ <xsd:element name="rate" type="xsd:double" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="unknownSSNFault">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="invalidSSNFault">
+ <xsd:sequence>
+ <xsd:element name="ssn" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <message name="getLoanQuoteRequest">
+ <part name="payload" type="typens:getLoanQuoteRequest" />
+ </message>
+
+ <message name="getLoanQuoteResponse">
+ <part name="payload" type="typens:getLoanQuoteResponse" />
+ </message>
+
+ <message name="unknownSSNFault">
+ <part name="payload" type="typens:unknownSSNFault" />
+ </message>
+
+ <message name="invalidSSNFault">
+ <part name="payload" type="typens:invalidSSNFault" />
+ </message>
+
+ <portType name="LoanBroker">
+ <operation name="getLoanQuote">
+ <input message="getLoanQuoteRequest" />
+ <output message="getLoanQuoteResponse" />
+ <fault name="UnknownSSN" message="tns:unknownSSNFault" />
+ <fault name="InvalidSSN" message="tns:invalidSSNFault" />
+ </operation>
+ </portType>
+
+ <!--
+ <plnk:partnerLinkType name="test1Request">
+ <plnk:role name="test1Service">
+ <plnk:portType name="test1PT"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+
+ <plnk:partnerLinkType name="probeRequest">
+ <plnk:role name="probeService">
+ <plnk:portType name="prb:probeMessagePT"/>
+ </plnk:role>
+ </plnk:partnerLinkType>
+ -->
+
+ <binding name="LoanBroker" type="tns:LoanBroker">
+ <operation name="request"></operation>
+ </binding>
+ <service name="LoanBrokerService">
+ <port name="loanbroker" binding="tns:LoanBroker" />
+ </service>
+</definitions>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/client/JMSClient.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/client/JMSClient.java?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/client/JMSClient.java (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/client/JMSClient.java Thu Mar 23 08:00:51 2006
@@ -0,0 +1,120 @@
+/**
+ *
+ * Copyright 2005 RAJD Consultanct Ltd
+ *
+ * Licensed 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.
+ *
+ **/
+import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.geronimo.connector.work.GeronimoWorkManager;
+import org.apache.geronimo.transaction.ExtendedTransactionManager;
+import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.jencks.factory.TransactionContextManagerFactoryBean;
+import org.jencks.factory.TransactionManagerFactoryBean;
+import org.jencks.factory.WorkManagerFactoryBean;
+import org.logicblaze.lingo.jms.Requestor;
+import org.logicblaze.lingo.jms.impl.MultiplexingRequestor;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.TextMessage;
+import javax.resource.spi.work.Work;
+
+/**
+ * @version $Revision: 372377 $
+ */
+public class JMSClient implements Work {
+
+ private static ConnectionFactory factory;
+ private static CountDownLatch latch;
+ private static Requestor requestor;
+
+ /**
+ * main ...
+ *
+ * @param args
+ * @throws Exception
+ */
+ public static void main(String[] args) throws Exception {
+ System.out.println("Connecting to JMS server.");
+ factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
+ Destination inQueue = new ActiveMQQueue("demo.org.servicemix.source");
+ Destination outQueue = new ActiveMQQueue("demo.org.servicemix.output");
+ requestor = MultiplexingRequestor.newInstance(factory, inQueue, outQueue);
+
+ if (args.length == 0) {
+ new JMSClient().run();
+ } else {
+ int nb = Integer.parseInt(args[0]);
+ int th = 30;
+ if (args.length > 1) {
+ th = Integer.parseInt(args[1]);
+ }
+ GeronimoWorkManager wm = createWorkManager(th);
+ latch = new CountDownLatch(nb);
+ for (int i = 0; i < nb; i++) {
+ wm.scheduleWork(new JMSClient());
+ }
+ latch.await();
+ wm.doStop();
+ }
+ System.out.println("Closing.");
+ requestor.close();
+ }
+
+ protected static GeronimoWorkManager createWorkManager(int poolSize) throws Exception {
+ TransactionManagerFactoryBean tmfb = new TransactionManagerFactoryBean();
+ tmfb.afterPropertiesSet();
+ TransactionContextManagerFactoryBean tcmfb = new TransactionContextManagerFactoryBean();
+ tcmfb.setTransactionManager((ExtendedTransactionManager) tmfb.getObject());
+ tcmfb.afterPropertiesSet();
+ WorkManagerFactoryBean wmfb = new WorkManagerFactoryBean();
+ wmfb.setTransactionContextManager((TransactionContextManager) tcmfb.getObject());
+ wmfb.setThreadPoolSize(poolSize);
+ wmfb.afterPropertiesSet();
+ GeronimoWorkManager wm = wmfb.getWorkManager();
+ return wm;
+ }
+
+ public void run() {
+ try {
+ System.out.println("Sending request.");
+ String request =
+"<getLoanQuoteRequest xmlns='urn:logicblaze:soa:loanbroker'>\n" +
+" <ssn>102-24532-53254</ssn>\n" +
+" <amount>" + Math.random() * 100000 + "</amount>\n" +
+" <duration>" + (int) Math.random() * 48 + "</duration>\n" +
+"</getLoanQuoteRequest>";
+ TextMessage out = requestor.getSession().createTextMessage(request);
+ TextMessage in = (TextMessage) requestor.request(null, out);
+ if (in == null) {
+ System.out.println("Response timed out.");
+ }
+ else {
+ System.out.println("Response: " + in.getText());
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (latch != null) {
+ latch.countDown();
+ }
+ }
+ }
+
+ public void release() {
+ }
+}
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/Bank.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/Bank.java?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/Bank.java (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/Bank.java Thu Mar 23 08:00:51 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package loanbroker;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.MessageExchangeListener;
+import org.apache.servicemix.components.util.ComponentSupport;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+
+public class Bank extends ComponentSupport implements MessageExchangeListener {
+
+ public Bank(int number) {
+ setService(new QName("urn:logicblaze:soa:bank", "Bank" + number));
+ setEndpoint("bank");
+ }
+
+ public void onMessageExchange(MessageExchange exchange) throws MessagingException {
+ InOut inOut = (InOut) exchange;
+ if (inOut.getStatus() == ExchangeStatus.DONE) {
+ return;
+ } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
+ return;
+ }
+ System.err.println(getService().getLocalPart() + " requested");
+ try {
+ String output = "<getLoanQuoteResponse xmlns=\"urn:logicblaze:soa:bank\"><rate>" + (Math.ceil(1000 * Math.random()) / 100) + "</rate></getLoanQuoteResponse>";
+ NormalizedMessage answer = inOut.createMessage();
+ answer.setContent(new StringSource(output));
+ answer(inOut, answer);
+ } catch (Exception e) {
+ throw new MessagingException(e);
+ }
+ }
+}
\ No newline at end of file
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/CreditAgency.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/CreditAgency.java?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/CreditAgency.java (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/components/loanbroker/CreditAgency.java Thu Mar 23 08:00:51 2006
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package loanbroker;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.Fault;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.namespace.QName;
+import javax.xml.transform.TransformerException;
+
+import org.apache.servicemix.MessageExchangeListener;
+import org.apache.servicemix.components.util.ComponentSupport;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.jbi.util.DOMUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+
+import com.sun.org.apache.xpath.internal.CachedXPathAPI;
+
+public class CreditAgency extends ComponentSupport implements MessageExchangeListener {
+
+ public CreditAgency() {
+ setService(new QName("urn:logicblaze:soa:creditagency", "CreditAgencyService"));
+ setEndpoint("agency");
+ }
+
+ public void onMessageExchange(MessageExchange exchange) throws MessagingException {
+ InOut inOut = (InOut) exchange;
+ if (inOut.getStatus() == ExchangeStatus.DONE) {
+ return;
+ } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
+ return;
+ }
+ try {
+ Document doc = (Document) new SourceTransformer().toDOMNode(inOut.getInMessage());
+ String ssn = textValueOfXPath(doc, "//*[local-name()='ssn']");
+ if (ssn == null || ssn.length() == 0) {
+ fail(exchange, new NullPointerException());
+ return;
+ }
+ if (!ssn.startsWith("1")) {
+ Fault fault = inOut.createFault();
+ fault.setContent(new StringSource("<InvalidSSN xmlns=\"urn:logicblaze:soa:creditagency\"><ssn>" + ssn + "</ssn></InvalidSSN>"));
+ fail(inOut, fault);
+ } else {
+ String operation = null;
+ if (inOut.getOperation() != null) {
+ operation = inOut.getOperation().getLocalPart();
+ } else {
+ operation = doc.getDocumentElement().getLocalName();
+ }
+ String output;
+ if ("getCreditScore".equals(operation)) {
+ output = "<getCreditScoreResponse xmlns=\"urn:logicblaze:soa:creditagency\"><score>" + getCreditScore(ssn) + "</score></getCreditScoreResponse>";
+ } else if ("getCreditHistoryLength".equals(operation)) {
+ output = "<getCreditHistoryLengthResponse xmlns=\"urn:logicblaze:soa:creditagency\"><length>" + getCreditHistoryLength(ssn) + "</length></getCreditHistoryLengthResponse>";
+ } else {
+ throw new UnsupportedOperationException(operation);
+ }
+ NormalizedMessage answer = inOut.createMessage();
+ answer.setContent(new StringSource(output));
+ answer(inOut, answer);
+ }
+ } catch (Exception e) {
+ throw new MessagingException(e);
+ }
+ }
+ int getCreditScore(String ssn) {
+ //return ((int) (Math.random() * 600) + 300);
+ return 1000;
+ }
+ int getCreditHistoryLength(String ssn) {
+ //return ((int) (Math.random() * 19) + 1);
+ return 10;
+ }
+
+ protected String textValueOfXPath(Node node, String xpath) throws TransformerException {
+ CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
+ NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, xpath);
+ Node root = iterator.nextNode();
+ if (root instanceof Element) {
+ Element element = (Element) root;
+ if (element == null) {
+ return "";
+ }
+ String text = DOMUtil.getElementText(element);
+ return text;
+ }
+ else if (root != null) {
+ return root.getNodeValue();
+ } else {
+ return null;
+ }
+ }
+}
\ No newline at end of file
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/lw-su/servicemix.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/lw-su/servicemix.xml?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/lw-su/servicemix.xml (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/lw-su/servicemix.xml Thu Mar 23 08:00:51 2006
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+ xmlns:lb="urn:logicblaze:soa:loanbroker"
+ xmlns:ca="urn:logicblaze:soa:creditagency">
+
+ <classpath>
+ <location>.</location>
+ </classpath>
+
+ <sm:serviceunit id="jbi">
+ <sm:activationSpecs>
+
+ <sm:activationSpec destinationService="lb:LoanBrokerService"
+ destinationOperation="lb:getLoanQuote">
+ <sm:component>
+ <bean class="org.apache.servicemix.components.jms.JmsServiceComponent">
+ <property name="template">
+ <bean class="org.springframework.jms.core.JmsTemplate">
+ <property name="connectionFactory" ref="jmsFactory" />
+ <property name="defaultDestinationName" value="demo.org.servicemix.source" />
+ <property name="pubSubDomain" value="false" />
+ </bean>
+ </property>
+ </bean>
+ </sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec interfaceName="ca:CreditAgency">
+ <sm:component>
+ <bean class="loanbroker.CreditAgency" />
+ </sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec>
+ <sm:component>
+ <bean class="loanbroker.Bank">
+ <constructor-arg value="1" />
+ </bean>
+ </sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec>
+ <sm:component>
+ <bean class="loanbroker.Bank">
+ <constructor-arg value="2" />
+ </bean>
+ </sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec>
+ <sm:component>
+ <bean class="loanbroker.Bank">
+ <constructor-arg value="3" />
+ </bean>
+ </sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec>
+ <sm:component>
+ <bean class="loanbroker.Bank">
+ <constructor-arg value="4" />
+ </bean>
+ </sm:component>
+ </sm:activationSpec>
+
+ <sm:activationSpec>
+ <sm:component>
+ <bean class="loanbroker.Bank">
+ <constructor-arg value="5" />
+ </bean>
+ </sm:component>
+ </sm:activationSpec>
+
+ </sm:activationSpecs>
+ </sm:serviceunit>
+
+ <bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
+ <property name="connectionFactory">
+ <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+ <property name="brokerURL" value="tcp://localhost:61616" />
+ </bean>
+ </property>
+ </bean>
+
+</beans>
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/DISCLAIMER.txt
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/DISCLAIMER.txt?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/DISCLAIMER.txt (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/DISCLAIMER.txt Thu Mar 23 08:00:51 2006
@@ -0,0 +1,7 @@
+ActiveMQ is an effort undergoing incubation at the Apache Software Foundation
+(ASF), sponsored by the Geronimo PMC. Incubation is required of all newly
+accepted projects until a further review indicates that the infrastructure,
+communications, and decision making process have stabilized in a manner
+consistent with other successful ASF projects. While incubation status is not
+necessarily a reflection of the completeness or stability of the code, it does
+indicate that the project has yet to be fully endorsed by the ASF.
\ No newline at end of file
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/LICENSE.txt?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/LICENSE.txt (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/LICENSE.txt Thu Mar 23 08:00:51 2006
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
Added: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/jbi.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/jbi.xml?rev=388195&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/jbi.xml (added)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/bpel-bpe/src/sa/META-INF/jbi.xml Thu Mar 23 08:00:51 2006
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
+
+ <service-assembly>
+ <identification>
+ <name>bpe-demo</name>
+ <description>BPE demo</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>bpe-su</name>
+ <description>Contains the bpel</description>
+ </identification>
+ <target>
+ <artifacts-zip>bpe-su.zip</artifacts-zip>
+ <component-name>servicemix-bpe</component-name>
+ </target>
+ </service-unit>
+ <service-unit>
+ <identification>
+ <name>lw-su</name>
+ <description>Contains the lightweight components</description>
+ </identification>
+ <target>
+ <artifacts-zip>lw-su.zip</artifacts-zip>
+ <component-name>servicemix-lwcontainer</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+
+</jbi>