[overlord-commits] Overlord SVN: r744 - in cdl/trunk: distribution and 44 other directories.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Tue Aug 4 12:29:37 EDT 2009
Author: jeff.yuchang
Date: 2009-08-04 12:29:35 -0400 (Tue, 04 Aug 2009)
New Revision: 744
Added:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/ClassLoaderUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/Decision.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/EPRStore.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/LogicalCourier.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/MessageUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/NameSpaceUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/StringUtils.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/XMLUtils.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/IfAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/ReceiveMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SendMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SwitchAction.java
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/MVELUsageTest.java
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/XMLUtilsTest.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryEPRStorage.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryStore.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/Quote.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/ResetMemoryStoreAction.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SendReqForQuoteDecision.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderConfirmRequestAction.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderRejectMessageAction.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuoteAction.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuotesListAction.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetRequestQuoteMessageAction.java
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/MemoryEPRStorage.java
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetOrderConfirmResponseAction.java
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetQuoteMessageAction.java
Removed:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/soa/overlord/
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/soa/overlord/
Modified:
cdl/trunk/distribution/pom.xml
cdl/trunk/docs/docbook/gettingstartedguide/pom.xml
cdl/trunk/docs/docbook/gettingstartedguide/src/main/master.xml
cdl/trunk/docs/docbook/pom.xml
cdl/trunk/docs/docbook/samplesguide/pom.xml
cdl/trunk/docs/docbook/samplesguide/src/main/master.xml
cdl/trunk/docs/docbook/userguide/pom.xml
cdl/trunk/docs/docbook/userguide/src/main/master.xml
cdl/trunk/pom.xml
cdl/trunk/runtime/jbossesb/pom.xml
cdl/trunk/runtime/pom.xml
cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml
cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/CreditAgencyDecision.java
cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/MemoryEPRStorage.java
cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckInvalidMessageAction.java
cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckResponseMessageAction.java
cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/jbossesb/purchasing/store/pom.xml
cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/MemoryEPRStorage.java
cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyFailedMessageAction.java
cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyResponseMessageAction.java
cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetCreditCheckRequestMessageAction.java
cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/pom.xml
cdl/trunk/validator/pom.xml
Log:
[SOAG-114] rename the package name.
Modified: cdl/trunk/distribution/pom.xml
===================================================================
--- cdl/trunk/distribution/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/distribution/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -19,12 +19,12 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>distribution</artifactId>
<packaging>pom</packaging>
- <name>Overlord::CDL::Distribution</name>
+ <name>Savara::Distribution</name>
<version>1.0-SNAPSHOT</version>
- <url>http://www.jboss.org/overlord</url>
+ <url>http://www.jboss.org/overlord/savara</url>
<properties>
<maven.test.skip>true</maven.test.skip>
@@ -33,18 +33,18 @@
<dependencies>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-runtime-jbossesb</artifactId>
+ <groupId>org.jboss.savara.runtime</groupId>
+ <artifactId>jbossesb</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.validator</groupId>
- <artifactId>cdl-validator-jbossesb</artifactId>
+ <groupId>org.jboss.savara.validator</groupId>
+ <artifactId>jbossesb</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.validator</groupId>
- <artifactId>cdl-jbossesb-assembly</artifactId>
+ <groupId>org.jboss.savara.validator</groupId>
+ <artifactId>jbossesb-assembly</artifactId>
<version>${pom.version}</version>
<type>esb</type>
</dependency>
@@ -71,7 +71,7 @@
<goal>single</goal>
</goals>
<configuration>
- <finalName>overlord-cdl-${project.version}-docs</finalName>
+ <finalName>savara-${project.version}-docs</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/docs.xml</descriptor>
@@ -91,7 +91,7 @@
<goal>single</goal>
</goals>
<configuration>
- <finalName>overlord-cdl-${project.version}-src</finalName>
+ <finalName>savara-${project.version}-src</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
@@ -111,7 +111,7 @@
<goal>single</goal>
</goals>
<configuration>
- <finalName>overlord-cdl-${project.version}</finalName>
+ <finalName>savara-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
Modified: cdl/trunk/docs/docbook/gettingstartedguide/pom.xml
===================================================================
--- cdl/trunk/docs/docbook/gettingstartedguide/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/gettingstartedguide/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -4,14 +4,13 @@
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.docs</groupId>
+ <groupId>org.jboss.savara.docs</groupId>
<artifactId>gettingstartedguide</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>Overlord::CDL::Docs::gettingstartedguide</name>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>docs</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Modified: cdl/trunk/docs/docbook/gettingstartedguide/src/main/master.xml
===================================================================
--- cdl/trunk/docs/docbook/gettingstartedguide/src/main/master.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/gettingstartedguide/src/main/master.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -5,7 +5,7 @@
<book lang="en">
<bookinfo>
- <title>JBoss Overlord CDL 1.0-M2</title>
+ <title>JBoss Savara 1.0-SNAPSHOT</title>
<subtitle>Getting Started Guide</subtitle>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/author_group.xml"/>
</bookinfo>
Modified: cdl/trunk/docs/docbook/pom.xml
===================================================================
--- cdl/trunk/docs/docbook/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -1,41 +1,24 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.jboss.soa.overlord.cdl</groupId>
- <artifactId>docs</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Overlord::CDL::Docs</name>
-
- <modules>
- <module>userguide</module>
- <module>samplesguide</module>
- <module>gettingstartedguide</module>
- </modules>
-
- <repositories>
- <repository>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <id>jboss.release</id>
- <name>JBoss releases</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <id>jboss.release</id>
- <name>JBoss releases</name>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
-
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.savara</groupId>
+ <artifactId>docs</artifactId>
+ <packaging>pom</packaging>
+ <name>Savara::docs</name>
+
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>savara</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <modules>
+ <module>userguide</module>
+ <module>samplesguide</module>
+ <module>gettingstartedguide</module>
+ </modules>
+
+</project>
Modified: cdl/trunk/docs/docbook/samplesguide/pom.xml
===================================================================
--- cdl/trunk/docs/docbook/samplesguide/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/samplesguide/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -4,14 +4,13 @@
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.docs</groupId>
+ <groupId>org.jboss.savara.docs</groupId>
<artifactId>samplesguide</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>Overlord::CDL::Docs::samplesguide</name>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>docs</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Modified: cdl/trunk/docs/docbook/samplesguide/src/main/master.xml
===================================================================
--- cdl/trunk/docs/docbook/samplesguide/src/main/master.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/samplesguide/src/main/master.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -5,7 +5,7 @@
<book lang="en">
<bookinfo>
- <title>JBoss Overlord CDL 1.0-M2</title>
+ <title>JBoss Savara 1.0-SNAPSHOT</title>
<subtitle>Samples Guide</subtitle>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/author_group.xml"/>
</bookinfo>
Modified: cdl/trunk/docs/docbook/userguide/pom.xml
===================================================================
--- cdl/trunk/docs/docbook/userguide/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/userguide/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -4,14 +4,13 @@
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.docs</groupId>
+ <groupId>org.jboss.savara.docs</groupId>
<artifactId>userguide</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>Overlord::CDL::Docs::userguide</name>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>docs</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Modified: cdl/trunk/docs/docbook/userguide/src/main/master.xml
===================================================================
--- cdl/trunk/docs/docbook/userguide/src/main/master.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/docs/docbook/userguide/src/main/master.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -5,7 +5,7 @@
<book lang="en">
<bookinfo>
- <title>JBoss Overlord CDL 1.0-M2</title>
+ <title>JBoss Savara 1.0-SNAPSHOT</title>
<subtitle>User Guide</subtitle>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/author_group.xml"/>
</bookinfo>
Modified: cdl/trunk/pom.xml
===================================================================
--- cdl/trunk/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,17 +2,17 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord</groupId>
- <artifactId>cdl</artifactId>
+ <groupId>org.jboss</groupId>
+ <artifactId>savara</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>Overlord::CDL</name>
- <url>http://www.jboss.org/overlord</url>
+ <name>Savara</name>
+ <url>http://www.jboss.org/overlord/savara</url>
<description>
- JBoss Overlord CDL.
+ JBoss Savara.
</description>
<scm>
- <connection>scm:svn:https://svn.jboss.org/repos/soag/cdl/trunk</connection>
+ <connection>scm:svn:https://svn.jboss.org/repos/soag/savara/trunk</connection>
</scm>
<developers>
<developer>
@@ -28,8 +28,8 @@
<developer>
<name>Gary Brown</name>
<id>objectiser</id>
- <email>gary.brown at hattricksoftware.com</email>
- <organization>Hattrick Software</organization>
+ <email>gbrown at redhat.com</email>
+ <organization>Red Hat</organization>
<roles>
<role>Developer</role>
</roles>
@@ -38,13 +38,11 @@
</developers>
<modules>
<module>runtime</module>
- <module>validator</module>
- <module>docs/docbook</module>
- <module>distribution</module>
+ <module>validator</module>
</modules>
<properties>
- <overlord-version>1.0-SNAPSHOT</overlord-version>
+ <savara-version>1.0-SNAPSHOT</savara-version>
<junit.version>4.4</junit.version>
<rosetta.version>4.5</rosetta.version>
<log4j.version>1.2.14</log4j.version>
@@ -54,8 +52,8 @@
<profile>
<id>release</id>
<modules>
- <module>docs</module>
- <module>docs/examples/gettingstarted</module>
+ <module>docs/docbook</module>
+ <module>distribution</module>
</modules>
</profile>
<profile>
@@ -80,7 +78,7 @@
<configuration>
<aggregate>true</aggregate>
<show>public</show>
- <title>JBoss Overlord ${project.version}</title>
+ <title>JBoss Savara ${project.version}</title>
</configuration>
</plugin>
</plugins>
Modified: cdl/trunk/runtime/jbossesb/pom.xml
===================================================================
--- cdl/trunk/runtime/jbossesb/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/runtime/jbossesb/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,14 +2,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-runtime-jbossesb</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <groupId>org.jboss.savara.runtime</groupId>
+ <artifactId>jbossesb</artifactId>
<packaging>jar</packaging>
- <name>Overlord::CDL::Runtime::JBossESB</name>
+ <name>Savara::Runtime::JBoss ESB</name>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>runtime</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
@@ -53,7 +52,7 @@
<goal>single</goal>
</goals>
<configuration>
- <finalName>overlord-cdl-runtime.esb</finalName>
+ <finalName>savara-runtime.esb</finalName>
<appendAssemblyId>true</appendAssemblyId>
<descriptors>
<descriptor>src/main/configs/esb-assembly.xml</descriptor>
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/ClassLoaderUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/ClassLoaderUtil.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/ClassLoaderUtil.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb;
+
+/**
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class ClassLoaderUtil {
+
+ public static Class<?> loadClass(String className) throws ClassNotFoundException {
+ return Thread.currentThread().getContextClassLoader().loadClass(className);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/Decision.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/Decision.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/Decision.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb;
+
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * This is the interface for {@link IfAction} decision-class attribute.
+ * That class has to implement this interface.
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public interface Decision {
+
+ /**
+ * Execute the decision business logic.
+ *
+ * @param message Message that is on the ESB pipeline.
+ * @return
+ */
+ boolean executeDecision(Message message);
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/EPRStore.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/EPRStore.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/EPRStore.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public interface EPRStore {
+
+ void registerRole(String roleName, Message message);
+
+ EPR getEPRByRole(String roleName, Message message);
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/LogicalCourier.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/LogicalCourier.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/LogicalCourier.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb;
+
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.addressing.eprs.*;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+
+/**
+ * This class providers the courier implementation associated
+ * with a LogicalEPR.
+ *
+ * @author <a href="mailto:gary.brown at hattricksoftware.com">Gary Brown</a>
+ */
+public class LogicalCourier implements org.jboss.soa.esb.couriers.Courier {
+
+ private ServiceInvoker serviceInvoker=null;
+
+ /**
+ * The constructor, supplied the logical EPR represented
+ * by the courier.
+ *
+ * @param epr The logical EPR
+ * @throws MessageDeliverException
+ */
+ public LogicalCourier(LogicalEPR epr)
+ throws MessageDeliverException {
+ serviceInvoker = epr.getServiceInvoker();
+ }
+
+ /**
+ * This method delivers the supplied message to the EPR
+ * associated with the logical courier.
+ *
+ * @param mesg The message
+ */
+ public boolean deliver(Message mesg) throws CourierException,
+ MalformedEPRException {
+
+ try {
+ serviceInvoker.deliverAsync(mesg);
+ } catch(MessageDeliverException e) {
+ throw new CourierException("Failed to deliver message", e);
+ }
+
+ return(true);
+ }
+
+ /**
+ * This method cleans up after the courier implementation
+ * is no longer required.
+ */
+ public void cleanup() {
+ serviceInvoker = null;
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/MessageUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/MessageUtil.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/MessageUtil.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-6 Pi4 Technologies 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.
+ *
+ *
+ * Change History:
+ * Mar 21, 2006 : Initial version created by gary
+ */
+package org.jboss.savara.jbossesb;
+
+import java.util.logging.Logger;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * This class represents utility functions for processing
+ * messages.
+ *
+ * @author <a href="mailto:gary.brown at hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ */
+public class MessageUtil {
+
+ private static Logger logger = Logger.getLogger(MessageUtil.class.getName());
+
+ /**
+ * This method returns the message type associated with the
+ * supplied value.
+ *
+ * @param value The value
+ * @return The message type
+ */
+ public static String getMessageType(Object value) {
+ String ret=null;
+
+ if (value instanceof org.w3c.dom.Node) {
+ String namespace=((org.w3c.dom.Node)value).getNamespaceURI();
+ String localpart=((org.w3c.dom.Node)value).getLocalName();
+
+ if (value instanceof org.w3c.dom.Element &&
+ ((org.w3c.dom.Element)value).hasAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance", "type")) {
+ String type=((org.w3c.dom.Element)value).getAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance", "type");
+
+ String prefix= XMLUtils.getPrefix(type);
+
+ localpart = XMLUtils.getLocalname(type);
+
+ if (prefix == null) {
+ namespace = null;
+ } else {
+ namespace = ((org.w3c.dom.Element)value).
+ getAttribute("xmlns:"+prefix);
+ if (!NameSpaceUtil.isNotNull(namespace)) {
+ namespace = null;
+ }
+ }
+ }
+
+ if (namespace == null) {
+ ret = localpart;
+ } else {
+ ret = NameSpaceUtil.getFullyQualifiedName(namespace,
+ localpart);
+ }
+ } else if (value instanceof String) {
+ ret = String.class.getName();
+
+ try {
+ Node node=XMLUtils.getNode((String)value);
+ ret = getMessageType(node);
+ } catch(Exception e) {
+ logger.warning("Failed to obtain message type from value: "+value);
+ }
+
+ } else {
+ ret = value.getClass().getName();
+ }
+
+ return(ret);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/NameSpaceUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/NameSpaceUtil.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/NameSpaceUtil.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2005 Pi4 Technologies 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.
+ *
+ *
+ * Change History:
+ * Jul 28, 2005 : Initial version created by gary
+ */
+package org.jboss.savara.jbossesb;
+
+/**
+ * This class provides helper functiions for manipulating fully
+ * qualified names (with local parts and namespaces).
+ *
+ * @author <a href="mailto:gary.brown at hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ */
+public class NameSpaceUtil {
+
+ public static final String NAMESPACE_PREFIX="{";
+ public static final String NAMESPACE_SUFFIX="}";
+
+ /**
+ * This method checks whether the supplied name is a
+ * fully qualified name, with the name space contained
+ * in braces, followed by a localpart.
+ *
+ * @param name The name
+ * @return Whether the name is a fully qualified name
+ */
+ public static boolean isFullyQualifiedName(String name) {
+ boolean ret=false;
+ int pos=0;
+
+ if (name != null && name.startsWith("{") &&
+ (pos=name.indexOf('}')) != -1 &&
+ name.length() != pos+1) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the fully qualified name associated
+ * with the supplied namespace and local part. If the namespace
+ * is null, or an empty string, then only the local part
+ * will be returned.
+ *
+ * @param namespace The namespace
+ * @param localpart The local part
+ * @return The fully qualified name
+ */
+ public static String getFullyQualifiedName(String namespace,
+ String localpart) {
+ String ret=null;
+
+ if (namespace != null && namespace.trim().length() > 0) {
+ ret = NAMESPACE_PREFIX+namespace+NAMESPACE_SUFFIX;
+ }
+
+ if (localpart != null) {
+ if (ret == null) {
+ ret = localpart;
+ } else {
+ ret += localpart;
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the namespace component of a fully
+ * qualified name. If the supplied name does not have the
+ * namespace prefix, then a null will be returned. If the
+ * supplied name does not have the suffix, then the contents
+ * following the prefix, to the end of the name, will be
+ * returned.
+ *
+ * @param qname The fully qualified name
+ * @return The namespace
+ */
+ public static String getNamespace(String qname) {
+ String ret=null;
+ int index=0;
+
+ if (qname != null &&
+ (index=qname.indexOf(NAMESPACE_PREFIX)) != -1) {
+ int endindex=qname.indexOf(NAMESPACE_SUFFIX);
+
+ if (endindex == -1) {
+ endindex = qname.length();
+ }
+
+ ret = qname.substring(index+1, endindex);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method extracts the local part from the supplied
+ * fully qualified name. If the namespace suffix cannot
+ * be found, then the fully supplied name will be
+ * returned.
+ *
+ * @param qname The fully qualified name
+ * @return The local part
+ */
+ public static String getLocalPart(String qname) {
+ String ret=null;
+ int index=0;
+
+ if (qname != null &&
+ (index=qname.indexOf(NAMESPACE_SUFFIX)) != -1) {
+ ret = qname.substring(index+1);
+ } else {
+ ret = qname;
+ }
+
+ return(ret);
+ }
+
+ public static boolean isNotNull(String value) {
+ return(value != null && value.trim().length() > 0);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/StringUtils.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/StringUtils.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/StringUtils.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb;
+
+/**
+ * This utility class for keeping some common used methods to deal with String.
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class StringUtils {
+
+ public static final boolean isNull(String string) {
+ if (string == null || "".equals(string.trim())) {
+ return true;
+ }
+ return false;
+ }
+
+ public static final boolean isNotNull(String string) {
+ return !isNull(string);
+ }
+
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/XMLUtils.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/XMLUtils.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/XMLUtils.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author <a href="mailto:gary.brown at hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ */
+
+public class XMLUtils {
+
+ /**
+ * This method converts the supplied text representation
+ * of an XML document into a DOM Node.
+ *
+ * @param text The text
+ * @return The node
+ * @throws XMLException Failed to convert the text
+ */
+ public static Node getNode(String text) throws Exception {
+ Node ret=null;
+
+ try {
+ // Transform the text representation to DOM
+ DocumentBuilderFactory fact=DocumentBuilderFactory.newInstance();
+ fact.setNamespaceAware(true);
+
+ InputStream xmlstr= new ByteArrayInputStream(text.getBytes());
+
+ DocumentBuilder builder=fact.newDocumentBuilder();
+ org.w3c.dom.Document doc=builder.parse(xmlstr);
+
+ ret = doc.getDocumentElement();
+
+ } catch(Exception e) {
+ throw new Exception("Failed to transform text " +
+ "into DOM representation", e);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the prefix part of the supplied
+ * qualified name.
+ *
+ * @param qname The qualified name
+ * @return The prefix
+ */
+ public static String getPrefix(String qname) {
+ String ret=null;
+ int pos=0;
+
+ if (qname != null && ((pos=qname.indexOf(':')) != -1)) {
+ ret = qname.substring(0, pos);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the localname part of the supplied
+ * qualified name.
+ *
+ * @param qname The qualified name
+ * @return The localname part
+ */
+ public static String getLocalname(String qname) {
+ String ret=qname;
+ int pos=0;
+
+ if (qname != null && ((pos=qname.indexOf(':')) != -1)) {
+ ret = qname.substring(pos+1);
+ }
+
+ return(ret);
+ }
+
+ /**
+ *
+ * @param object
+ * @param expression: xpath expression
+ * @return
+ * @throws Exception
+ */
+ public static String executeXpath(Object object, String expression) throws Exception {
+ XPathFactory factory = XPathFactory.newInstance();
+ XPath theXpath = factory.newXPath();
+
+ if (object instanceof String) {
+ String xmlMessage = (String)object;
+ Node node = getNode(xmlMessage);
+ return theXpath.evaluate(expression, node);
+ } else if (object instanceof Element) {
+ return theXpath.evaluate(expression, object);
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/IfAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/IfAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/IfAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb.actions;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.ClassLoaderUtil;
+import org.jboss.savara.jbossesb.Decision;
+import org.jboss.savara.jbossesb.StringUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+
+/**
+ * This action represents a choice between a set of specified paths
+ * based on the message that has occurred.
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.savara.jbossesb.actions.IfAction" name="c3" process="process">
+ <property name="paths">
+ <if service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision1" decision-class="org.jboss.soa.overlord.jbossesb.TestDecision"/>
+ <elseif service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision2" decision-class="org.jboss.soa.overlord.jbossesb.Test2ndDecision"/>
+ <else service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision3"/>
+ </property>
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>serivce-category</i> - mapped to JBoss ESB service-category.</li>
+ * <li><i>service-name</i> - mapped to JBossESB service-name.<li>
+ * <li><i>decision-class</i> - the class that implements {Decision} interface.</li>
+ * </ul>
+ *
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class IfAction extends AbstractActionLifecycle{
+
+ public static final String SERVICE_CATEGORY = "service-category";
+ public static final String SERVICE_NAME = "service-name";
+ public static final String DECISION_CLASS = "decision-class";
+
+ private static final String IF_STATEMENT = "if";
+ private static final String ELSE_STATEMENT = "else";
+ private static final String ELSEIF_STATEMENT = "elseif";
+
+ private static Logger logger = Logger.getLogger(IfAction.class);
+
+ private ConfigTree config;
+
+ private ConfigTree ifBranch;
+
+ private List<ConfigTree> elseifBranchs = new LinkedList<ConfigTree>();
+
+ private ConfigTree elseBranch;
+
+ public IfAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ parseConfiguration();
+
+ if (!executeConditionBranch(message, ifBranch)) {
+ boolean successFlag = false;
+ for (ConfigTree elseifBranch : elseifBranchs) {
+ if (executeConditionBranch(message, elseifBranch)) {
+ successFlag = true;
+ break;
+ }
+ }
+
+ if (!successFlag){
+ String category = elseBranch.getAttribute(SERVICE_CATEGORY);
+ String name = elseBranch.getAttribute(SERVICE_NAME);
+ ServiceInvoker invoker= new ServiceInvoker(category, name);
+ invoker.deliverAsync(message);
+ }
+ }
+
+ return message;
+ }
+
+ private boolean executeConditionBranch(Message message, ConfigTree branch) throws Exception {
+ String decisionClzString = branch.getAttribute(DECISION_CLASS);
+ String category = branch.getAttribute(SERVICE_CATEGORY);
+ String name = branch.getAttribute(SERVICE_NAME);
+
+ if (StringUtils.isNull(decisionClzString)){
+ throw new Exception("The decision-class attribute can not be null or empty string");
+ }
+ Class<?> decisionClz = ClassLoaderUtil.loadClass(decisionClzString);
+ if (!Decision.class.isAssignableFrom(decisionClz)){
+ throw new Exception("The decision-class of " + decisionClzString + " doesn't implement the Decision Interface.");
+ }
+
+ Decision decision = (Decision) decisionClz.newInstance();
+ if (decision.executeDecision(message)){
+ ServiceInvoker invoker= new ServiceInvoker(category, name);
+ invoker.deliverAsync(message);
+ logger.debug("The message has been delivered to service of [category=" + category + "/name=" + name + "]");
+ return true;
+ }
+
+ return false;
+ }
+
+
+ private void parseConfiguration() throws Exception {
+ ConfigTree[] children=config.getAllChildren();
+ for (ConfigTree ct : children) {
+ if (IF_STATEMENT.equals(ct.getName())) {
+ ifBranch = ct;
+ } else if (ELSEIF_STATEMENT.equals(ct.getName())) {
+ elseifBranchs.add(ct);
+ } else if (ELSE_STATEMENT.equals(ct.getName())){
+ elseBranch= ct;
+ } else {
+ throw new Exception("Unrecognized configuration Node in IfAction.");
+ }
+ }
+ }
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/ReceiveMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/ReceiveMessageAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/ReceiveMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb.actions;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.ClassLoaderUtil;
+import org.jboss.savara.jbossesb.EPRStore;
+import org.jboss.savara.jbossesb.MessageUtil;
+import org.jboss.savara.jbossesb.StringUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * The ReceiveMessageAction is used to explicitly define the message type that should be received.
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="c2" process="process">
+ <property name="messageType" value="CreditCheckRequest"/>
+ <property name="clientRole" value="Buyer" />
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>messageType </i> - Define the message type that should be received.</li>
+ * </ul>
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class ReceiveMessageAction extends AbstractActionLifecycle{
+
+ public static final String OPERATION = "operation";
+
+ public static final String MESSAGE_TYPE = "messageType";
+
+ public static final String CLIENT_ROLE = "clientRole";
+
+ public static final String STORAGE_CLASS = "eprStore";
+
+ private static Logger logger = Logger.getLogger(ReceiveMessageAction.class);
+
+ private ConfigTree config;
+
+ public ReceiveMessageAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ String expected = config.getAttribute(MESSAGE_TYPE);
+ if (StringUtils.isNull(expected)) {
+ throw new Exception("The messageType is not defined.");
+ }
+
+ Object value=message.getBody().get();
+ if (value instanceof byte[]) {
+ value = new String((byte[])value);
+ }
+ String receivedMessageType = MessageUtil.getMessageType(value);
+ logger.info("Received [ " + receivedMessageType + "] Message Type");
+
+ if (!expected.equals(receivedMessageType)) {
+ throw new Exception ("Unexpected message type= "+ receivedMessageType + ", but expecting type="+ expected);
+ }
+
+ String roleName = config.getAttribute(CLIENT_ROLE);
+ String store = config.getAttribute(STORAGE_CLASS);
+
+ if (StringUtils.isNotNull(roleName) && StringUtils.isNotNull(store)) {
+ registerEPRwithRoleName(roleName, store, message);
+ }
+
+ return message;
+ }
+
+ private void registerEPRwithRoleName(String roleName, String storageClass, Message message) throws Exception {
+ Class<?> storageClz = ClassLoaderUtil.loadClass(storageClass);
+ if (!EPRStore.class.isAssignableFrom(storageClz)){
+ throw new Exception("The storageClass of " + storageClass + " doesn't implement the EPRStorage Interface.");
+ }
+
+ EPRStore storage = (EPRStore)storageClz.newInstance();
+ storage.registerRole(roleName, message);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SendMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SendMessageAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SendMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb.actions;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
+import org.jboss.savara.jbossesb.ClassLoaderUtil;
+import org.jboss.savara.jbossesb.EPRStore;
+import org.jboss.savara.jbossesb.LogicalCourier;
+import org.jboss.savara.jbossesb.MessageUtil;
+import org.jboss.savara.jbossesb.StringUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+
+/**
+ * Deliver message to the target service.
+ *
+ * <p>
+ * This action enables a message, being processed by the action pipeline, to be sent to a nominated destination.
+ * The destination for the message being sent can be identified in two ways:
+ * </p>
+ *
+ * <ul>
+ * <li>
+ * <i>Explicitly</i><br/>
+ * A service category and name can be specified, to indicate the destination of the message to be sent.
+ * When this approach is used, it will be possible to optionally specify a 'reply to' service category and name,
+ * to which any subsequent response can be sent. In this case, the 'reply to' service category and name will be placed on the schedule for the session.
+ * </li>
+ * <li>
+ * <i>Implicitly</i>(Based on JBossESB EPR)<br/>
+ * If a previously received message had a 'reply to EPR', which was then associated with a label,
+ * then the message can be sent back to the originator of that previous message by specifying the label associated with the EPR.
+ * </li>
+ * </ul>
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction"
+ process="process" name="s4-3">
+ <property name="messageType" value="quoteList" />
+ <property name="clientRole" value="buyer" />
+ <property name="eprStore" value="orgization.your.impl.EPRStorageImpl" />
+ </action>
+ * }
+ * </pre>
+ * OR:
+ * <pre>
+ * {@literal
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="s8-4">
+ <property name="messageType" value="requestForQuote" />
+ <property name="serviceName" value="supplier.serviceName" />
+ <property name="serviceCategory" value="supplier.serviceCategory" />
+ <property name="responseServiceName" value="RequestForQuote.main.1" />
+ <property name="responseServiceCategory" value="ESBBroker.BrokerParticipant" />
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>messageType </i> - Define the message type that is prepared to sent to.</li>
+ * <li><i>clientRole</i> - This is JBossESB EPR Label, represents a JBossESB EPR that can be used to send a message to.</li>
+ * <li><i>serviceName</i> - Mapped to JBossESB service-name.</li>
+ * <li><i>serviceCategory</i> - Mapped to JBossESB service-category.</li>
+ * <li><i>responseServiceName</i> - The service-name of the responded message.</li>
+ * <li><i>responseServiceCategory</i> - The service-category of the responded message.</li>
+ * <li><i>eprStore</i> - The class that is responsible for registering, getting EPR from roleName. </li>
+ * </ul>
+ *
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class SendMessageAction extends AbstractActionLifecycle{
+
+ public static final String SERVICE_CATEGORY = "serviceCategory";
+
+ public static final String SERVICE_NAME = "serviceName";
+
+ public static final String MESSAGE_TYPE = "messageType";
+
+ public static final String OPERATION = "operation";
+
+ public static final String RESPONSE_SERVICE_CATEGORY = "responseServiceCategory";
+
+ public static final String RESPONSE_SERVICE_NAME = "responseServiceName";
+
+ public static final String CLIENT_ROLE = "clientRole";
+
+ public static final String STORAGE_CLASS = "eprStore";
+
+ private ConfigTree config;
+
+ private Logger logger = Logger.getLogger(SendMessageAction.class);
+
+ public SendMessageAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ String expected = config.getAttribute(MESSAGE_TYPE);
+ if (StringUtils.isNull(expected)) {
+ throw new Exception("The messageType is not defined.");
+ }
+
+ Object value=message.getBody().get();
+ if (value instanceof byte[]) {
+ value = new String((byte[])value);
+ }
+ String receivedMessageType = MessageUtil.getMessageType(value);
+
+ if (!expected.equals(receivedMessageType)) {
+ throw new Exception ("Unexpected message type= "+ receivedMessageType + ", but expecting type="+ expected);
+ }
+
+ Message deliverMessage = constructDeliverMessage(message);
+
+ String category = config.getAttribute(SERVICE_CATEGORY);
+ String serviceName = config.getAttribute(SERVICE_NAME);
+ String clientRole = config.getAttribute(CLIENT_ROLE);
+ String storageClass = config.getAttribute(STORAGE_CLASS);
+
+ if (StringUtils.isNotNull(category) && StringUtils.isNotNull(serviceName)
+ && StringUtils.isNotNull(clientRole)) {
+ throw new Exception ("[serviceCategory/serviceName] and [clientRole] can NOT co-exist.");
+ }
+
+ if (StringUtils.isNotNull(category) && StringUtils.isNotNull(serviceName)){
+ ServiceInvoker invoker = new ServiceInvoker(category, serviceName);
+ invoker.deliverAsync(deliverMessage);
+ logger.info("Send Message to [" + category + "/" + serviceName + "]" );
+ } else if (StringUtils.isNotNull(clientRole) && StringUtils.isNotNull(storageClass)) {
+
+ deliverMessageToRole(clientRole, storageClass, deliverMessage, message);
+ logger.info("Send Message to [" + clientRole + "]" );
+ } else {
+ throw new Exception ("Failed to send message, because can't find [serivceCategory/serviceName]," +
+ "nor clientRole.");
+ }
+
+ return message;
+
+ }
+
+
+ private Message constructDeliverMessage(Message message) {
+ Message deliverMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+ deliverMessage.getBody().add(message.getBody().get());
+
+ String respCategory = config.getAttribute(RESPONSE_SERVICE_CATEGORY);
+ String respName = config.getAttribute(RESPONSE_SERVICE_NAME);
+
+ if (StringUtils.isNotNull(respCategory) && StringUtils.isNotNull(respName)) {
+ LogicalEPR lepr= new LogicalEPR(respCategory, respName);
+ deliverMessage.getHeader().getCall().setReplyTo(lepr);
+ }
+ return deliverMessage;
+ }
+
+ private void deliverMessageToRole(String roleName, String storageClass,
+ Message deliverMessage, Message message) throws Exception {
+ Class<?> storageClz = ClassLoaderUtil.loadClass(storageClass);
+ if (!EPRStore.class.isAssignableFrom(storageClz)){
+ throw new Exception("The storageClass of " + storageClass + " doesn't implement the EPRStorage Interface.");
+ }
+
+ EPRStore storage = (EPRStore)storageClz.newInstance();
+ EPR epr = storage.getEPRByRole(roleName, message);
+ logger.debug("The reply EPR is: " + EPRHelper.toXMLString(epr));
+
+ Courier courier = null;
+ // Workaround, as CourierFactory currently does not support logical EPRs.
+ if (epr instanceof LogicalEPR) {
+ courier = new LogicalCourier((LogicalEPR) epr);
+ } else {
+ courier = CourierFactory.getCourier(epr);
+ }
+ courier.deliver(deliverMessage);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SwitchAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SwitchAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/savara/jbossesb/actions/SwitchAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb.actions;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.savara.jbossesb.MessageUtil;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * SwitchAction provides a means to select the relevant path based on the type of a message being processed by the action.
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.savara.jbossesb.actions.SwitchAction"
+ process="process" name="s11-2">
+ <property name="paths">
+ <case service-category="ESBBroker.BrokerParticipant"
+ service-name="CompleteTransaction.main.2" >
+ <message type="CreditCheckOk" />
+ </case>
+ <case service-category="ESBBroker.BrokerParticipant"
+ service-name="CompleteTransaction.main.4" >
+ <message type="CreditCheckInvalid" />
+ </case>
+ </property>
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>serivce-category</i> - mapped to JBoss ESB service-category.</li>
+ * <li><i>service-name</i> - mapped to JBossESB service-name.<li>
+ * <li><i>type</i> - The message type that should be received.</li>
+ * </ul>
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class SwitchAction extends AbstractActionLifecycle{
+
+ public static final String CASE_STATEMENT = "case";
+
+ public static final String SERVICE_NAME = "service-name";
+
+ public static final String SERVICE_CATEGORY = "service-category";
+
+ public static final String MESSAGE_TYPE = "type";
+
+ public static final String SERVICE_DESC_NAME = "serviceDescriptionName";
+
+ public static final String CONVERSATION_TYPE = "conversationType";
+
+ private ConfigTree config;
+
+ private List<ConfigTree> caseBranchs = new LinkedList<ConfigTree>();
+
+ private String serviceDescName;
+
+ private String conversationType;
+
+ public SwitchAction(ConfigTree config){
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ parseConfiguration();
+
+ Object value=message.getBody().get();
+ if (value instanceof byte[]) {
+ value = new String((byte[])value);
+ }
+ String messageType = MessageUtil.getMessageType(value);
+
+ //TODO: Need to deal with the messageType null scenario.
+
+ for (ConfigTree caseBranch : caseBranchs) {
+ ConfigTree[] msgs = caseBranch.getAllChildren();
+ for (ConfigTree msg : msgs) {
+ if (msg.getName().equals("message")) {
+ String type = msg.getAttribute("type");
+ if (messageType.equals(type)) {
+ String category = caseBranch.getAttribute(SERVICE_CATEGORY);
+ String svcName = caseBranch.getAttribute(SERVICE_NAME);
+ ServiceInvoker invoker = new ServiceInvoker(category, svcName);
+ invoker.deliverAsync(message);
+ return message;
+ }
+ }
+ }
+ }
+
+ return message;
+ }
+
+
+ private void parseConfiguration() {
+ serviceDescName = config.getAttribute(SERVICE_DESC_NAME);
+ conversationType = config.getAttribute(CONVERSATION_TYPE);
+
+ ConfigTree[] children = config.getAllChildren();
+ for (ConfigTree ct : children) {
+ if (CASE_STATEMENT.equals(ct.getName())) {
+ caseBranchs.add(ct);
+ }
+ }
+ }
+
+ public String getServiceDescName() {
+ return serviceDescName;
+ }
+
+ public String getConversationType() {
+ return conversationType;
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/MVELUsageTest.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/MVELUsageTest.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/MVELUsageTest.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb.util;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mvel.MVEL;
+
+import junit.framework.Assert;
+
+/**
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class MVELUsageTest extends Assert {
+
+ private Example example;
+
+ @Before
+ public void setUp() {
+ example = new Example();
+ example.setProperty("exampleProperty");
+ }
+
+ @Test
+ public void testPropertyAssessor() throws Exception {
+ String expression = "property";
+ String value = (String)MVEL.eval(expression, example);
+
+ assertEquals("exampleProperty", value);
+ }
+
+ @Test
+ public void testInvokeMethod() throws Exception {
+ String expression = "isInvoked()";
+ boolean result = (Boolean)MVEL.eval(expression, example);
+ assertEquals(true, result);
+ }
+
+ @Test
+ public void testPropertyInjection() throws Exception {
+ String expression="property";
+ MVEL.setProperty(example, expression, "AnotherValue");
+ assertEquals("AnotherValue", MVEL.eval(expression, example));
+ }
+
+ @Test
+ public void testIntegerInjection() throws Exception {
+ Integer i = new Integer(5);
+ MVEL.setProperty(example, "counter", i);
+ assertEquals(5, example.getCounter());
+ }
+
+ @Test
+ public void testGetProperty() throws Exception {
+ String property = "property";
+ assertEquals("exampleProperty", MVEL.getProperty(property, example));
+ }
+
+
+ @Test
+ public void testSetObject() throws Exception {
+ String property = "quote.value";
+ MVEL.setProperty(example, property, new Integer(5));
+ assertEquals(5, MVEL.getProperty(property, example));
+ }
+
+ public class Example {
+
+ private String property;
+
+ private int counter;
+
+ private Quote quote = new Quote();
+
+ public String getProperty() {
+ return property;
+ }
+
+ public void setProperty(String property) {
+ this.property = property;
+ }
+
+ public boolean isInvoked() {
+ return true;
+ }
+
+ public int getCounter() {
+ return counter;
+ }
+
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+ public Quote getQuote() {
+ return quote;
+ }
+
+ public void setQuote(Quote quote) {
+ this.quote = quote;
+ }
+
+ }
+
+ public class Quote {
+ private String name;
+ private int value;
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public int getValue() {
+ return value;
+ }
+ public void setValue(int value) {
+ this.value = value;
+ }
+
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/XMLUtilsTest.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/XMLUtilsTest.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/savara/jbossesb/util/XMLUtilsTest.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.jbossesb.util;
+
+import org.w3c.dom.Element;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.junit.Test;
+
+import junit.framework.Assert;
+
+/**
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class XMLUtilsTest extends Assert{
+
+ @Test
+ public void testExecuteXpath() throws Exception {
+ String val="<order><orderId id=\""+3+"\" /></order>";
+ String expr="/order/orderId/@id";
+
+ String value = XMLUtils.executeXpath(val, expr);
+ assertEquals("3",value);
+
+ Element element = (Element) XMLUtils.getNode(val);
+ assertEquals("3", XMLUtils.executeXpath(element, expr));
+ }
+
+ @Test
+ public void testXpathAttribute() throws Exception {
+ String val = "<requestForQuote id=\"20\" supplierDesc=\"{http://www.jboss.org/overlord/loanBroker}Supplier1\" ></requestForQuote>";
+ String expr = "//@id";
+
+ Element element = (Element) XMLUtils.getNode(val);
+ assertEquals("20", XMLUtils.executeXpath(element, expr));
+ assertEquals("{http://www.jboss.org/overlord/loanBroker}Supplier1", XMLUtils.executeXpath(element, "//@supplierDesc"));
+
+ }
+
+ @Test
+ public void testXpathNode() throws Exception {
+ String val = "<quote id=\"20\" supplierDesc = \"{http://www.jboss.org/overlord/loanBroker}Supplier1\">10</quote>";
+ String expr = "/quote";
+
+ Element element = (Element) XMLUtils.getNode(val);
+ assertEquals("10", XMLUtils.executeXpath(element, expr));
+ }
+
+}
Modified: cdl/trunk/runtime/pom.xml
===================================================================
--- cdl/trunk/runtime/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/runtime/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,15 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>runtime</artifactId>
<packaging>pom</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>Overlord::CDL::Runtime</name>
+ <name>Savara::Runtime</name>
<parent>
- <groupId>org.jboss.soa.overlord</groupId>
- <artifactId>cdl</artifactId>
+ <groupId>org.jboss</groupId>
+ <artifactId>savara</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Modified: cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,15 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.samples</groupId>
+ <groupId>org.jboss.savara.samples</groupId>
<artifactId>jbossesb-broker</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jboss-esb</packaging>
- <name>Overlord::CDL::Samples::Broker</name>
+ <name>Savara::Samples::Broker</name>
<url>http://www.jboss.org/overlord</url>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>samples</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
@@ -23,9 +22,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-runtime-jbossesb</artifactId>
- <version>${cdl.jbossesb.version}</version>
+ <groupId>org.jboss.savara.runtime</groupId>
+ <artifactId>jbossesb</artifactId>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryEPRStorage.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryEPRStorage.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryEPRStorage.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.savara.jbossesb.EPRStore;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.message.Message;
+
+
+/**
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class MemoryEPRStorage implements EPRStore {
+
+ private static final Map<String, EPR> storage = new HashMap<String, EPR>();
+
+ public EPR getEPRByRole(String roleName, Message message) {
+ return storage.get(roleName);
+ }
+
+ public void registerRole(String roleName, Message message) {
+ EPR epr = message.getHeader().getCall().getReplyTo();
+ storage.put(roleName, epr);
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryStore.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryStore.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/MemoryStore.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+/**
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class MemoryStore {
+
+ private static int counter = 0;
+
+ public static void increaseCounter() {
+ counter = counter + 1;
+ }
+
+ public static void decreaseCounter() {
+ counter = counter - 1;
+ }
+
+ public static int getCounter() {
+ return counter;
+ }
+
+ public static void reset() {
+ counter = 0;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/Quote.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/Quote.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/Quote.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import java.io.Serializable;
+
+
+
+public class Quote implements Serializable {
+
+ private static final long serialVersionUID = 3234324947672128469L;
+
+ private String value;
+
+ private String serviceDescription;
+
+ public String getServiceDescription() {
+ return serviceDescription;
+ }
+
+ public void setServiceDescription(String serviceDescription) {
+ this.serviceDescription = serviceDescription;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/ResetMemoryStoreAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/ResetMemoryStoreAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/ResetMemoryStoreAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class ResetMemoryStoreAction extends AbstractActionLifecycle {
+
+ private static Logger logger = Logger.getLogger(ResetMemoryStoreAction.class);
+
+ private ConfigTree config;
+
+ public ResetMemoryStoreAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception{
+ MemoryStore.reset();
+ logger.info("Reseting the memory store counter to 0");
+ return(message);
+ }
+
+}
\ No newline at end of file
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SendReqForQuoteDecision.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SendReqForQuoteDecision.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SendReqForQuoteDecision.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.Decision;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class SendReqForQuoteDecision implements Decision {
+
+ private final int DEFAULT = 1;
+
+ private Logger logger = Logger.getLogger(SendReqForQuoteDecision.class);
+
+ /* (non-Javadoc)
+ * @see org.jboss.soa.overlord.jbossesb.Decision#executeDecision(org.jboss.soa.esb.message.Message)
+ */
+ public boolean executeDecision(Message message) {
+ if (DEFAULT > MemoryStore.getCounter()) {
+ logger.info("The decision is true");
+ return true;
+ }
+ logger.info("The decision is false");
+ return false;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+public class SetCreditCheckRequestMessageAction extends AbstractActionLifecycle {
+
+ private static Logger logger = Logger.getLogger(SetCreditCheckRequestMessageAction.class);
+
+ private ConfigTree config;
+
+ public SetCreditCheckRequestMessageAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception{
+
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+ message.getBody().add("<CreditCheckRequest id=\"" + idValue +"\"></CreditCheckRequest>");
+
+ logger.info("Updated credit check request message: "+message.getBody().get());
+
+ return(message);
+ }
+
+}
\ No newline at end of file
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderConfirmRequestAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderConfirmRequestAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderConfirmRequestAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class SetOrderConfirmRequestAction extends AbstractActionLifecycle {
+
+ public static Logger logger = Logger.getLogger(SetOrderConfirmRequestAction.class);
+
+ private ConfigTree config;
+
+ public SetOrderConfirmRequestAction(ConfigTree config){
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+
+ message.getBody().add("<orderConfirmed id=\"" + idValue +"\" supplierDesc=\"{http://www.jboss.org/overlord/loanBroker}Supplier1\" quoteValue=\"10\">" +
+ "</orderConfirmed>");
+
+ logger.info(message.getBody().get());
+
+ return message;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderRejectMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderRejectMessageAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetOrderRejectMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class SetOrderRejectMessageAction extends AbstractActionLifecycle {
+
+ public static Logger logger = Logger.getLogger(SetOrderRejectMessageAction.class);
+
+ private ConfigTree config;
+
+ public SetOrderRejectMessageAction(ConfigTree config){
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+
+ message.getBody().add("<orderRejected id=\"" + idValue + "\">Credit Card is invalid!</orderRejected>");
+
+ logger.info(message.getBody().get());
+
+ return message;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuoteAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuoteAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuoteAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class SetQuoteAction extends AbstractActionLifecycle {
+
+ private Logger logger = Logger.getLogger(SetQuoteAction.class);
+
+ private ConfigTree config;
+
+ public SetQuoteAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+ String quoteValue = node.getTextContent();
+ String desc = node.getAttributes().getNamedItem("supplierDesc").getNodeValue();
+
+ List<Quote> quotes = (List<Quote>)message.getProperties().getProperty("quotes");
+ if (quotes == null) {
+ quotes = new ArrayList<Quote>();
+ }
+
+ Quote quote = new Quote();
+ quote.setServiceDescription(desc);
+ quote.setValue(quoteValue);
+
+ quotes.add(quote);
+
+ message.getProperties().setProperty("quotes", quotes);
+
+ MemoryStore.increaseCounter();
+
+ logger.info("set quote message :[" + node + "]");
+
+ return message;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuotesListAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuotesListAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetQuotesListAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class SetQuotesListAction extends AbstractActionLifecycle {
+
+ private Logger logger = Logger.getLogger(SetQuotesListAction.class);
+
+ private ConfigTree config;
+
+ public SetQuotesListAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+
+ List<Quote> quotes = (List<Quote>)message.getProperties().getProperty("quotes");
+
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+
+ StringBuffer sbuffer = new StringBuffer();
+ sbuffer.append("<quoteList id=\"" + idValue + "\">");
+
+ for(Quote quote : quotes) {
+ sbuffer.append("<quote supplierDesc=\"" + quote.getServiceDescription() + "\">");
+ sbuffer.append(quote.getValue());
+ sbuffer.append("</quote>");
+ }
+
+ sbuffer.append("</quoteList>");
+
+ message.getBody().add(sbuffer.toString());
+
+ logger.info("set quote list message :[" + sbuffer.toString() + "]");
+
+ return message;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetRequestQuoteMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetRequestQuoteMessageAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/java/org/jboss/savara/samples/jbossesb/loan/broker/SetRequestQuoteMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.loan.broker;
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class SetRequestQuoteMessageAction extends AbstractActionLifecycle {
+
+ public static Logger logger = Logger.getLogger(SetRequestQuoteMessageAction.class);
+
+ private ConfigTree config;
+
+ public SetRequestQuoteMessageAction(ConfigTree config){
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+
+ String serviceDescription = (String)message.getProperties().getProperty("serviceDescriptionName");
+
+ message.getBody().add("<requestForQuote id=\"" + idValue +"\" supplierDesc=\"" + serviceDescription+ "\" ></requestForQuote>");
+
+ logger.info("Set 'requestForQuote' : " + message.getBody().get());
+
+ return message;
+ }
+
+}
Modified: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -51,7 +51,7 @@
<jms-listener busidref="busId1" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction" name="ESBBrokerProcess_Broker_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SwitchAction" name="ESBBrokerProcess_Broker_action_1" process="process">
<property name="serviceDescriptionName" value="{org.pi4soa.esbbroker.esbbroker}ESBBrokerProcess-Broker"/>
<property name="conversationType" value="overlord.cdl.samples.LoanBroker at Broker"/>
<property name="paths">
@@ -76,17 +76,17 @@
<jms-listener busidref="busId2" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__1_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__1_action_1" process="process">
<property name="operation" value="makeEnquiry"/>
<property name="messageType" value="enquiry"/>
<property name="clientRole" value="Buyer"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.loan.broker.MemoryEPRStorage" />
</action>
- <action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.ResetMemoryStoreAction" name="resetMemoryStore" process="process">
+ <action class="org.jboss.savara.samples.jbossesb.loan.broker.ResetMemoryStoreAction" name="resetMemoryStore" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.IfAction" name="ESBBrokerProcess_Broker__1_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.IfAction" name="ESBBrokerProcess_Broker__1_action_2" process="process">
<property name="paths">
- <if service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__2" decision-class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SendReqForQuoteDecision"/>
+ <if service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__2" decision-class="org.jboss.savara.samples.jbossesb.loan.broker.SendReqForQuoteDecision"/>
<else service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__3"/>
</property>
</action>
@@ -97,9 +97,9 @@
<jms-listener busidref="busId3" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__2"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="b-1" process="process">
+ <action class="org.jboss.savara.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="b-1" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__2_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__2_action_1" process="process">
<property name="operation" value="getQuote"/>
<property name="messageType" value="requestForQuote"/>
<property name="serviceCategory" value="org.pi4soa.esbbroker.esbbroker"/>
@@ -114,7 +114,7 @@
<jms-listener busidref="busId4" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__3"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="b-13" process="process">
+ <action class="org.jboss.savara.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="b-13" process="process">
</action>
</actions>
</service>
@@ -123,15 +123,15 @@
<jms-listener busidref="busId5" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__4"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__4_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__4_action_1" process="process">
<property name="operation" value="getQuote"/>
<property name="messageType" value="quote"/>
</action>
- <action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetQuoteAction" name="b-2" process="process">
+ <action class="org.jboss.savara.samples.jbossesb.loan.broker.SetQuoteAction" name="b-2" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.IfAction" name="ESBBrokerProcess_Broker__4_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.IfAction" name="ESBBrokerProcess_Broker__4_action_2" process="process">
<property name="paths">
- <if service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__5" decision-class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SendReqForQuoteDecision"/>
+ <if service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__5" decision-class="org.jboss.savara.samples.jbossesb.loan.broker.SendReqForQuoteDecision"/>
<else service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__7"/>
</property>
</action>
@@ -142,7 +142,7 @@
<jms-listener busidref="busId6" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__5"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__5_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__5_action_1" process="process">
<property name="operation" value="getQuote"/>
<property name="messageType" value="requestForQuote"/>
<property name="serviceCategory" value="org.pi4soa.esbbroker.esbbroker"/>
@@ -157,7 +157,7 @@
<jms-listener busidref="busId7" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__6"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="b-1" process="process">
+ <action class="org.jboss.savara.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="b-1" process="process">
</action>
</actions>
</service>
@@ -166,13 +166,13 @@
<jms-listener busidref="busId8" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__7"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetQuotesListAction" name="b-3" process="process">
+ <action class="org.jboss.savara.samples.jbossesb.loan.broker.SetQuotesListAction" name="b-3" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__7_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__7_action_1" process="process">
<property name="operation" value="makeEnquiry"/>
<property name="messageType" value="quoteList"/>
<property name="clientRole" value="Buyer"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.loan.broker.MemoryEPRStorage" />
</action>
</actions>
</service>
@@ -181,15 +181,15 @@
<jms-listener busidref="busId9" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__8"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__8_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__8_action_1" process="process">
<property name="operation" value="buy"/>
<property name="messageType" value="buy"/>
<property name="clientRole" value="Buyer"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.loan.broker.MemoryEPRStorage" />
</action>
- <action name="creditCheck-Request" class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetCreditCheckRequestMessageAction" >
+ <action name="creditCheck-Request" class="org.jboss.savara.samples.jbossesb.loan.broker.SetCreditCheckRequestMessageAction" >
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__8_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__8_action_2" process="process">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckRequest"/>
<property name="serviceCategory" value="org.pi4soa.purchase.purchasegoods"/>
@@ -204,13 +204,13 @@
<jms-listener busidref="busId10" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__9"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__9_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__9_action_1" process="process">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckOk"/>
</action>
- <action name="set-orderConfirm" class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetOrderConfirmRequestAction">
+ <action name="set-orderConfirm" class="org.jboss.savara.samples.jbossesb.loan.broker.SetOrderConfirmRequestAction">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__9_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__9_action_2" process="process">
<property name="operation" value="confirm"/>
<property name="messageType" value="orderConfirmed"/>
<property name="serviceCategory" value="org.pi4soa.esbbroker.esbbroker"/>
@@ -225,15 +225,15 @@
<jms-listener busidref="busId11" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__10"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__10_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__10_action_1" process="process">
<property name="operation" value="confirm"/>
<property name="messageType" value="bookingReference"/>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__10_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__10_action_2" process="process">
<property name="operation" value="buy"/>
<property name="messageType" value="bookingReference"/>
<property name="clientRole" value="Buyer"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.loan.broker.MemoryEPRStorage" />
</action>
</actions>
</service>
@@ -242,16 +242,16 @@
<jms-listener busidref="busId12" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__11"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__11_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__11_action_1" process="process">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckInvalid"/>
</action>
- <action name="set-orderRejected" class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetOrderRejectMessageAction"></action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__11_action_2" process="process">
+ <action name="set-orderRejected" class="org.jboss.savara.samples.jbossesb.loan.broker.SetOrderRejectMessageAction"></action>
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_Broker__11_action_2" process="process">
<property name="operation" value="buy"/>
<property name="messageType" value="orderRejected"/>
<property name="clientRole" value="Buyer"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.loan.broker.MemoryEPRStorage" />
</action>
</actions>
</service>
@@ -260,7 +260,7 @@
<jms-listener busidref="busId13" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__12"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__12_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_Broker__12_action_1" process="process">
<property name="operation" value="cancel"/>
<property name="messageType" value="cancel"/>
</action>
@@ -271,7 +271,7 @@
<jms-listener busidref="busId14" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-checkCredit"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction" name="checkCredit_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SwitchAction" name="checkCredit_action_1" process="process">
<property name="paths">
<case service-category="org.pi4soa.esbbroker.esbbroker" service-name="ESBBrokerProcess_Broker__9">
<message type="CreditCheckOk"/>
Modified: cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,15 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.samples</groupId>
+ <groupId>org.jboss.savara.samples</groupId>
<artifactId>jbossesb-supplier</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jboss-esb</packaging>
- <name>Overlord::CDL::Samples::Supplier</name>
+ <name>Savara::Samples::Supplier</name>
<url>http://www.jboss.org/overlord</url>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>samples</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
@@ -23,9 +22,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-runtime-jbossesb</artifactId>
- <version>${cdl.jbossesb.version}</version>
+ <groupId>org.jboss.savara.runtime</groupId>
+ <artifactId>jbossesb</artifactId>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
Added: cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/MemoryEPRStorage.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/MemoryEPRStorage.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/MemoryEPRStorage.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.savara.samples.jbossesb.supplier;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.savara.jbossesb.EPRStore;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
+ *
+ */
+public class MemoryEPRStorage implements EPRStore {
+
+ private static final Map<String, EPR> storage = new HashMap<String, EPR>();
+
+ public EPR getEPRByRole(String roleName, Message message) {
+ return storage.get(roleName);
+ }
+
+ public void registerRole(String roleName, Message message) {
+ EPR epr = message.getHeader().getCall().getReplyTo();
+ storage.put(roleName, epr);
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetOrderConfirmResponseAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetOrderConfirmResponseAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetOrderConfirmResponseAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,43 @@
+package org.jboss.savara.samples.jbossesb.supplier;
+
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class SetOrderConfirmResponseAction extends AbstractActionLifecycle {
+
+ private Logger logger = Logger.getLogger(SetOrderConfirmResponseAction.class);
+
+ private ConfigTree config;
+
+ public SetOrderConfirmResponseAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+ String quoteValue = node.getAttributes().getNamedItem("quoteValue").getNodeValue();
+
+ String supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1";
+ String confirmation = "The quote of " + quoteValue + " has been confirmed.";
+
+ String body = "<bookingReference id=\"" + idValue + "\" supplierDesc = \""
+ + supplierDesc+ "\">"+confirmation +"</bookingReference>";
+
+ message.getBody().add(body);
+
+ logger.info("set 'bookingReference' of [" + body + "]");
+ return message;
+ }
+
+}
Added: cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetQuoteMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetQuoteMessageAction.java (rev 0)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/java/org/jboss/savara/samples/jbossesb/supplier/SetQuoteMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -0,0 +1,40 @@
+package org.jboss.savara.samples.jbossesb.supplier;
+
+
+import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.w3c.dom.Node;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class SetQuoteMessageAction extends AbstractActionLifecycle {
+
+ private Logger logger = Logger.getLogger(SetQuoteMessageAction.class);
+
+ private ConfigTree config;
+
+ public SetQuoteMessageAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ Node node = XMLUtils.getNode((String)message.getBody().get());
+
+ String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
+ String supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1";
+
+ String body = "<quote id=\"" + idValue + "\" supplierDesc = \""
+ + supplierDesc+ "\">10</quote>";
+
+ message.getBody().add(body);
+
+ logger.info("set 'quote' of [" + body + "]");
+ return message;
+ }
+
+}
Modified: cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -37,19 +37,19 @@
<jms-listener busidref="busId2" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_SupplierTxnProcessor__1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_SupplierTxnProcessor__1_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_SupplierTxnProcessor__1_action_1" process="process">
<property name="operation" value="confirm"/>
<property name="messageType" value="orderConfirmed"/>
<property name="clientRole" value="Broker" />
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.supplier.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.supplier.MemoryEPRStorage" />
</action>
- <action class="org.jboss.soa.overlord.samples.jbossesb.supplier.SetOrderConfirmResponseAction" name="su-1">
+ <action class="org.jboss.savara.samples.jbossesb.supplier.SetOrderConfirmResponseAction" name="su-1">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_SupplierTxnProcessor__1_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_SupplierTxnProcessor__1_action_2" process="process">
<property name="operation" value="confirm"/>
<property name="messageType" value="bookingReference"/>
<property name="clientRole" value="Broker"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.supplier.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.supplier.MemoryEPRStorage" />
</action>
</actions>
</service>
@@ -58,7 +58,7 @@
<jms-listener busidref="busId3" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_SupplierQuoteEngine"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction" name="ESBBrokerProcess_SupplierQuoteEngine_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SwitchAction" name="ESBBrokerProcess_SupplierQuoteEngine_action_1" process="process">
<property name="serviceDescriptionName" value="{org.pi4soa.esbbroker.esbbroker}ESBBrokerProcess-SupplierQuoteEngine"/>
<property name="conversationType" value="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine"/>
<property name="paths">
@@ -74,19 +74,19 @@
<jms-listener busidref="busId4" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_SupplierQuoteEngine__1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_SupplierQuoteEngine__1_action_1" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction" name="ESBBrokerProcess_SupplierQuoteEngine__1_action_1" process="process">
<property name="operation" value="getQuote"/>
<property name="messageType" value="requestForQuote"/>
<property name="clientRole" value="Broker"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.supplier.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.supplier.MemoryEPRStorage" />
</action>
- <action class="org.jboss.soa.overlord.samples.jbossesb.supplier.SetQuoteMessageAction" name="su1-2">
+ <action class="org.jboss.savara.samples.jbossesb.supplier.SetQuoteMessageAction" name="su1-2">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_SupplierQuoteEngine__1_action_2" process="process">
+ <action class="org.jboss.savara.jbossesb.actions.SendMessageAction" name="ESBBrokerProcess_SupplierQuoteEngine__1_action_2" process="process">
<property name="operation" value="getQuote"/>
<property name="messageType" value="quote"/>
<property name="clientRole" value="Broker"/>
- <property name="eprStore" value="org.jboss.soa.overlord.samples.jbossesb.supplier.MemoryEPRStorage" />
+ <property name="eprStore" value="org.jboss.savara.samples.jbossesb.supplier.MemoryEPRStorage" />
</action>
</actions>
</service>
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,15 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.samples</groupId>
+ <groupId>org.jboss.savara.samples</groupId>
<artifactId>jbossesb-creditAgency</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jboss-esb</packaging>
- <name>Overlord::CDL::Samples::CreditAgency</name>
+ <name>Savara::Samples::CreditAgency</name>
<url>http://www.jboss.org/overlord</url>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>samples</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
@@ -23,9 +22,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-runtime-jbossesb</artifactId>
- <version>${cdl.jbossesb.version}</version>
+ <groupId>org.jboss.savara.runtime</groupId>
+ <artifactId>jbossesb</artifactId>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/CreditAgencyDecision.java
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/CreditAgencyDecision.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/CreditAgencyDecision.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -19,8 +19,8 @@
*/
package com.acme.services.creditAgency;
+import org.jboss.savara.jbossesb.Decision;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Decision;
/**
* @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/MemoryEPRStorage.java
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/MemoryEPRStorage.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/MemoryEPRStorage.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -22,9 +22,9 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.savara.jbossesb.EPRStore;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.EPRStore;
/**
* @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckInvalidMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckInvalidMessageAction.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckInvalidMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -20,10 +20,10 @@
package com.acme.services.creditAgency;
import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
import org.jboss.soa.esb.actions.AbstractActionLifecycle;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.w3c.dom.Node;
public class SetCreditCheckInvalidMessageAction extends AbstractActionLifecycle {
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckResponseMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckResponseMessageAction.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/src/main/java/com/acme/services/creditAgency/SetCreditCheckResponseMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -20,10 +20,10 @@
package com.acme.services.creditAgency;
import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
import org.jboss.soa.esb.actions.AbstractActionLifecycle;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.w3c.dom.Node;
public class SetCreditCheckResponseMessageAction extends AbstractActionLifecycle {
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -43,7 +43,7 @@
<property name="clientRole" value="Store" />
<property name="eprStore" value="com.acme.services.creditAgency.MemoryEPRStorage" />
</action>
- <action name="c3" process="process" class="org.jboss.soa.overlord.jbossesb.actions.IfAction">
+ <action name="c3" process="process" class="org.jboss.savara.jbossesb.actions.IfAction">
<property name="paths">
<if service-category="org.pi4soa.purchase.purchasegoods" service-name="PurchaseGoodsProcess_CreditAgency__2" decision-class="com.acme.services.creditAgency.CreditAgencyDecision"/>
<else service-category="org.pi4soa.purchase.purchasegoods" service-name="PurchaseGoodsProcess_CreditAgency__3"/>
@@ -58,7 +58,7 @@
<actions mep="OneWay">
<action name="custom-1" process="process" class="com.acme.services.creditAgency.SetCreditCheckResponseMessageAction">
</action>
- <action name="c4" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction">
+ <action name="c4" process="process" class="org.jboss.savara.jbossesb.actions.SendMessageAction">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckOk"/>
<property name="clientRole" value="Store"/>
@@ -73,7 +73,7 @@
<actions mep="OneWay">
<action name="custom-2" process="process" class="com.acme.services.creditAgency.SetCreditCheckInvalidMessageAction">
</action>
- <action name="c5" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction">
+ <action name="c5" process="process" class="org.jboss.savara.jbossesb.actions.SendMessageAction">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckInvalid"/>
<property name="clientRole" value="Store"/>
Modified: cdl/trunk/samples/jbossesb/purchasing/store/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/purchasing/store/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,15 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl.samples</groupId>
+ <groupId>org.jboss.savara.samples</groupId>
<artifactId>jbossesb-purchasing</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jboss-esb</packaging>
- <name>Overlord::CDL::Samples::Purchasing</name>
- <url>http://www.jboss.org/soag</url>
+ <name>Savara::Samples::Purchasing</name>
+ <url>http://www.jboss.org/overlord</url>
<parent>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>samples</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
@@ -23,9 +22,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-runtime-jbossesb</artifactId>
- <version>${cdl.jbossesb.version}</version>
+ <groupId>org.jboss.savara.runtime</groupId>
+ <artifactId>jbossesb</artifactId>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/MemoryEPRStorage.java
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/MemoryEPRStorage.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/MemoryEPRStorage.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -22,9 +22,9 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.savara.jbossesb.EPRStore;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.EPRStore;
/**
* @author <a href="mailto:cyu at redhat.com">Jeff Yu</a>
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyFailedMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyFailedMessageAction.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyFailedMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -20,10 +20,10 @@
package com.acme.services.broker;
import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
import org.jboss.soa.esb.actions.AbstractActionLifecycle;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.w3c.dom.Node;
/*
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyResponseMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyResponseMessageAction.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetBuyResponseMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -20,10 +20,10 @@
package com.acme.services.broker;
import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
import org.jboss.soa.esb.actions.AbstractActionLifecycle;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.w3c.dom.Node;
public class SetBuyResponseMessageAction extends AbstractActionLifecycle {
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetCreditCheckRequestMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetCreditCheckRequestMessageAction.java 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/SetCreditCheckRequestMessageAction.java 2009-08-04 16:29:35 UTC (rev 744)
@@ -20,10 +20,10 @@
package com.acme.services.broker;
import org.apache.log4j.Logger;
+import org.jboss.savara.jbossesb.XMLUtils;
import org.jboss.soa.esb.actions.AbstractActionLifecycle;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.w3c.dom.Node;
public class SetCreditCheckRequestMessageAction extends AbstractActionLifecycle {
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -24,7 +24,7 @@
<jms-listener busidref="busId1" maxThreads="1" name="org.pi4soa.purchase.purchasegoods-PurchaseGoodsProcess_Store"/>
</listeners>
<actions mep="OneWay">
- <action name="s1" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction">
+ <action name="s1" process="process" class="org.jboss.savara.jbossesb.actions.SwitchAction">
<property name="serviceDescriptionName" value="{org.pi4soa.purchase.purchasegoods}PurchaseGoodsProcess-Store"/>
<property name="conversationType" value="overlord.cdl.samples.Purchasing at Store"/>
<property name="paths">
@@ -40,7 +40,7 @@
<jms-listener busidref="busId2" maxThreads="1" name="org.pi4soa.purchase.purchasegoods-PurchaseGoodsProcess_Store__1"/>
</listeners>
<actions mep="OneWay">
- <action name="s2" process="process" class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction">
+ <action name="s2" process="process" class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction">
<property name="operation" value="buy"/>
<property name="messageType" value="BuyRequest"/>
<property name="clientRole" value="Buyer" />
@@ -48,7 +48,7 @@
</action>
<action name="s3" process="process" class="com.acme.services.broker.SetCreditCheckRequestMessageAction">
</action>
- <action name="s4" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction">
+ <action name="s4" process="process" class="org.jboss.savara.jbossesb.actions.SendMessageAction">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckRequest"/>
<property name="serviceCategory" value="org.pi4soa.purchase.purchasegoods"/>
@@ -63,13 +63,13 @@
<jms-listener busidref="busId3" maxThreads="1" name="org.pi4soa.purchase.purchasegoods-PurchaseGoodsProcess_Store__2"/>
</listeners>
<actions mep="OneWay">
- <action name="s5" process="process" class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction">
+ <action name="s5" process="process" class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckOk"/>
</action>
<action name="purchasing-success" class="com.acme.services.broker.SetBuyResponseMessageAction">
</action>
- <action name="s6" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction">
+ <action name="s6" process="process" class="org.jboss.savara.jbossesb.actions.SendMessageAction">
<property name="operation" value="buy"/>
<property name="messageType" value="BuyConfirmed"/>
<property name="clientRole" value="Buyer"/>
@@ -82,12 +82,12 @@
<jms-listener busidref="busId4" maxThreads="1" name="org.pi4soa.purchase.purchasegoods-PurchaseGoodsProcess_Store__3"/>
</listeners>
<actions mep="OneWay">
- <action name="s7" process="process" class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction">
+ <action name="s7" process="process" class="org.jboss.savara.jbossesb.actions.ReceiveMessageAction">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckInvalid"/>
</action>
<action name="purchasing-failed" class="com.acme.services.broker.SetBuyFailedMessageAction"></action>
- <action name="s8" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction">
+ <action name="s8" process="process" class="org.jboss.savara.jbossesb.actions.SendMessageAction">
<property name="operation" value="buy"/>
<property name="messageType" value="BuyFailed"/>
<property name="clientRole" value="Buyer"/>
@@ -100,7 +100,7 @@
<jms-listener busidref="busId5" maxThreads="1" name="org.pi4soa.purchase.purchasegoods-checkCredit"/>
</listeners>
<actions mep="OneWay">
- <action name="s9" process="process" class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction">
+ <action name="s9" process="process" class="org.jboss.savara.jbossesb.actions.SwitchAction">
<property name="paths">
<case service-category="org.pi4soa.purchase.purchasegoods" service-name="PurchaseGoodsProcess_Store__2">
<message type="CreditCheckOk"/>
Modified: cdl/trunk/samples/pom.xml
===================================================================
--- cdl/trunk/samples/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/samples/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -2,15 +2,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.soa.overlord.cdl</groupId>
+ <groupId>org.jboss.savara</groupId>
<artifactId>samples</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
- <name>Overlord::CDL::Samples</name>
+ <name>Savara::Samples</name>
<parent>
- <groupId>org.jboss.soa.overlord</groupId>
- <artifactId>cdl</artifactId>
+ <groupId>org.jboss</groupId>
+ <artifactId>savara</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Modified: cdl/trunk/validator/pom.xml
===================================================================
--- cdl/trunk/validator/pom.xml 2009-08-04 13:22:40 UTC (rev 743)
+++ cdl/trunk/validator/pom.xml 2009-08-04 16:29:35 UTC (rev 744)
@@ -9,8 +9,8 @@
<name>Overlord::CDL::Validator</name>
<parent>
- <groupId>org.jboss.soa.overlord</groupId>
- <artifactId>cdl</artifactId>
+ <groupId>org.jboss</groupId>
+ <artifactId>savara</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
More information about the overlord-commits
mailing list