servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r889811 - in /servicemix/smx4/features/trunk: assembly/src/main/descriptors/ examples/loan-broker-bpel/ examples/loan-broker-bpel/client/src/main/resources/ examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/ examples/loan-b...
Date Fri, 11 Dec 2009 20:43:25 GMT
Author: jbonofre
Date: Fri Dec 11 20:43:24 2009
New Revision: 889811

URL: http://svn.apache.org/viewvc?rev=889811&view=rev
Log:
[SMX4-437] Update loan-broker-bpel example to use ode-1.3.4 feature.

Added:
    servicemix/smx4/features/trunk/examples/loan-broker-bpel/client/src/main/resources/
    servicemix/smx4/features/trunk/examples/loan-broker-bpel/client/src/main/resources/log4j.properties
Modified:
    servicemix/smx4/features/trunk/assembly/src/main/descriptors/unix-bin.xml
    servicemix/smx4/features/trunk/assembly/src/main/descriptors/windows-bin.xml
    servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt
    servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl
    servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml

Modified: servicemix/smx4/features/trunk/assembly/src/main/descriptors/unix-bin.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/assembly/src/main/descriptors/unix-bin.xml?rev=889811&r1=889810&r2=889811&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/assembly/src/main/descriptors/unix-bin.xml (original)
+++ servicemix/smx4/features/trunk/assembly/src/main/descriptors/unix-bin.xml Fri Dec 11 20:43:24
2009
@@ -134,7 +134,6 @@
                 <exclude>**/.classpath</exclude>
                 <exclude>**/.project</exclude>
                 <exclude>**/.settings/**</exclude>
-                <exclude>**/loan-broker-bpel/**</exclude>
             </excludes>
         </fileSet>
         

Modified: servicemix/smx4/features/trunk/assembly/src/main/descriptors/windows-bin.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/assembly/src/main/descriptors/windows-bin.xml?rev=889811&r1=889810&r2=889811&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/assembly/src/main/descriptors/windows-bin.xml (original)
+++ servicemix/smx4/features/trunk/assembly/src/main/descriptors/windows-bin.xml Fri Dec 11
20:43:24 2009
@@ -122,7 +122,6 @@
               <exclude>**/.classpath</exclude>
               <exclude>**/.project</exclude>
               <exclude>**/.settings/**</exclude>
-              <exclude>**/loan-broker-bpel/**</exclude>
           </excludes>
       </fileSet>
 

Modified: servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt?rev=889811&r1=889810&r2=889811&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt Fri Dec 11 20:43:24
2009
@@ -18,32 +18,78 @@
 Welcome to the Servicemix Loan Broker example
 =============================================
 
-This example is based on the great EIP book 
+This example is based on the EIP book 
 (http://www.enterpriseintegrationpatterns.com/ComposedMessagingExample.html).
 It leverages the BPEL service engine, JMS binding component and some 
 lightweight components provided by ServiceMix.
 
-First start a ServiceMix server (if not already started) by running
-  bin/servicemix
-in the root dir of this ditribution.
-
-This example depends on Apache Ode JBI Service Engine which has not been
-released yet.  You will need to build it yourself (more informations at
-http://incubator.apache.org/ode/getting-ode.html).  You will need to copy
-the Service Engine installer to the install directory of this distribution
-prior to the following instructions.
+Prerequisites for Running this Example
+--------------------------------------
+1. You must have the following installed on your machine:
+   - JDK 1.5 or higher.
+   - Apache Maven 2.0.9 or higher.
+
+For more information, see the README in the top-level examples directory.
+
+2. Start ServiceMix by running the following command:
+   <servicemix_home>/bin/servicemix    (on UNIX)
+   <servicemix_home>\bin\servicemix    (on Windows)
+
+Installing ODE
+--------------
+
+This example depends on the Apache ODE JBI service engine. This component
+has not yet been released with support ServiceMix 4 but a SNAPSHOT is
+available.
+
+Install ODE from the ServiceMix Console with the following commands:
+
+   features:addUrl mvn:org.apache.ode.ode-jbi-karaf/features/1.3.4-SNAPSHOT/xml/features
+   features:install ode
+
+Building and Deploying
+----------------------
+This example uses the ServiceMix JBI Maven plugin to build the SUs and the SA.
+To build the example, run the following command (from the directory that contains
+this README):
 
-To run this sample, launch the following commands:
   mvn install
 
-You can deploy the example on ServiceMix 4 in two different ways:
-- using hotdeploy: 
-   copy the loan-broker-sa/target/loan-broker-sa-${version}.zip to <servicemix_home>/deploy
-- using the ServiceMix console:
-   osgi/install -s mvn:org.apache.servicemix.examples.loan-broker/loan-broker-sa/${version}/zip
+If all of the required bundles are available in your local Maven repository, 
+the example will build quickly. Otherwise it may take some time for Maven
+to download everything it needs.
 
-To test this sample, launch the following commands:
-  ant run
+Once complete, you will find the SA, called
+loan-broker-sa-${version}.zip, in the loan-broker-sa/target directory
+of this example.
 
-For more information on this example please see
-  http://servicemix.apache.org/loan-broker-bpel.html
+You can deploy the SA in two ways:
+
+- Using Hot Deployment
+  --------------------
+   
+  Copy the loan-broker-sa-${version}.zip file to the
+  <servicemix_home>/deploy directory.
+
+- Using the ServiceMix Console
+  ----------------------------
+
+  Type the following command:
+
+  osgi:install -s mvn:org.apache.servicemix.examples.loan-broker/loan-broker-sa/${version}/zip
+
+
+Running the Client
+------------------
+This example provides a simple JMS client. To run the client:
+
+1. Change to the <servicemix_home>/examples/loan-broker-bpel/client directory.
+
+2. Run the following command:
+
+   mvn compile exec:java
+
+Changing the Example
+--------------------
+If you change the code or configuration in the example, use 'mvn install' to rebuild the
+JBI SA zip, and deploy it as described above.

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/client/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/client/src/main/resources/log4j.properties?rev=889811&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/client/src/main/resources/log4j.properties
(added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/client/src/main/resources/log4j.properties
Fri Dec 11 20:43:24 2009
@@ -0,0 +1,5 @@
+log4j.rootLogger=WARN, STDOUT
+
+log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
+log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
+log4j.appender.STDOUT.layout.ConversionPattern=%m%n

Modified: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl?rev=889811&r1=889810&r2=889811&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl
(original)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl
Fri Dec 11 20:43:24 2009
@@ -24,35 +24,28 @@
 
 rule UnkownOperation
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null,
-					   operation != "{urn:logicblaze:soa:creditagency}getCreditHistoryLength", 
-		               operation != "{urn:logicblaze:soa:creditagency}getCreditScore" )
+      Exchange( status == Exchange.ACTIVE, $in : in !=null,
+         operation != "{urn:logicblaze:soa:creditagency}getCreditHistoryLength",
+         operation != "{urn:logicblaze:soa:creditagency}getCreditScore",
+         eval(jbi == null || !jbi.isExchangeHandled()))
 	then
 		jbi.fault("<UnknownOperation xmlns='urn:logicblaze:soa:creditagency'/>");
 end
 
-/*
-rule BadSSN
-	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
-		eval( $in.xpath("/*:ssn/text() <= 0") )
-	then
-		jbi.fault("<InvalidSSN xmlns='urn:logicblaze:soa:creditagency'><ssn>" + x +
</ssn></InvalidSSN>");
-end
-*/
-
 rule CreditHistory
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null,
-					   operation == "{urn:logicblaze:soa:creditagency}getCreditHistoryLength" )
+      Exchange( status == Exchange.ACTIVE, $in : in != null,
+         operation == "{urn:logicblaze:soa:creditagency}getCreditHistoryLength",
+         eval(jbi == null || !jbi.isExchangeHandled()))
 	then
 		jbi.answer("<getCreditHistoryLengthResponse xmlns='urn:logicblaze:soa:creditagency'><length>"
+ 100 + "</length></getCreditHistoryLengthResponse>");
 end
 
 rule CreditScore
 	when
-		me : Exchange( status == Exchange.ACTIVE, $in : in != null,
-		               operation == "{urn:logicblaze:soa:creditagency}getCreditScore" )
+      Exchange( status == Exchange.ACTIVE, $in : in != null,
+         operation == "{urn:logicblaze:soa:creditagency}getCreditScore",
+         eval(jbi == null || !jbi.isExchangeHandled()))
 	then
 		jbi.answer("<getCreditScoreResponse xmlns='urn:logicblaze:soa:creditagency'><score>"
+ 1000 + "</score></getCreditScoreResponse>");
 end

Modified: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml?rev=889811&r1=889810&r2=889811&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml (original)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml Fri
Dec 11 20:43:24 2009
@@ -32,19 +32,7 @@
     <packaging>jbi-service-unit</packaging>
     <name>ServiceMix :: Samples :: Loan Broker :: Ode</name>
 
-    <dependencies>
-        <!--
-        <dependency>
-            <groupId>org.apache.ode</groupId>
-            <artifactId>ode-tools</artifactId>
-            <version>${ode-version}</version>
-            <scope>test</scope>
-        </dependency>
-        -->
-    </dependencies>
-
     <properties>
-        <ode-version>2.0-SNAPSHOT</ode-version>
         <componentName>OdeBpelEngine</componentName>
     </properties>
 
@@ -56,35 +44,6 @@
                 <version>${servicemix-jbi-plugin-version}</version>
                 <extensions>true</extensions>
             </plugin>
-            <!--
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>compile-bpel</id>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <tasks>
-                                <taskdef classname="org.apache.ode.tools.bpelc.ant.BpelCTask"
name="bpelc">
-                                    <classpath>
-                                        <pathelement path="${basedir}/target/classes"
/>
-                                        <path refid="maven.test.classpath" />
-                                    </classpath>
-                                </taskdef>
-                                <mkdir dir="${basedir}/target/bpel/" />
-                                <bpelc targetDir="${basedir}/target/bpel/">
-                                    <bpel url="${basedir}/src/main/resources/loanbroker.bpel"
/>
-                                </bpelc>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            -->
         </plugins>
     </build>
 </project>



Mime
View raw message