Overlord SVN: r44 - in trunk/tools/jbossesb: src and 2 other directories.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-06-20 18:35:03 -0400 (Fri, 20 Jun 2008)
New Revision: 44
Added:
trunk/tools/jbossesb/pom.xml
trunk/tools/jbossesb/src/main/
trunk/tools/jbossesb/src/main/java/
trunk/tools/jbossesb/src/main/java/org/
Removed:
trunk/tools/jbossesb/src/org/
Modified:
trunk/tools/jbossesb/.classpath
Log:
Mavenized JBossESB plugin.
Modified: trunk/tools/jbossesb/.classpath
===================================================================
--- trunk/tools/jbossesb/.classpath 2008-06-20 13:50:56 UTC (rev 43)
+++ trunk/tools/jbossesb/.classpath 2008-06-20 22:35:03 UTC (rev 44)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
Added: trunk/tools/jbossesb/pom.xml
===================================================================
--- trunk/tools/jbossesb/pom.xml (rev 0)
+++ trunk/tools/jbossesb/pom.xml 2008-06-20 22:35:03 UTC (rev 44)
@@ -0,0 +1,139 @@
+<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.tools</groupId>
+ <artifactId>jbossesb</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Overlord::Tools::JBossESB</name>
+ <url>http://www.jboss.org/overlord</url>
+
+ <parent>
+ <groupId>org.jboss.soa.overlord</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>resources</artifactId>
+ <version>3.3.0-v20070604</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scribble</groupId>
+ <artifactId>core</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scribble</groupId>
+ <artifactId>osgi</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scribble</groupId>
+ <artifactId>conversation.model</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scribble</groupId>
+ <artifactId>lang.model</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jdt</groupId>
+ <artifactId>core</artifactId>
+ <version>3.3.0-v_771</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse</groupId>
+ <artifactId>ui</artifactId>
+ <version>3.3.0-I20070614-0800</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>plugin.xml</include>
+ <include>plugin.properties</include>
+ </includes>
+ <targetPath>/</targetPath>
+ </resource>
+ <resource>
+ <directory>${basedir}/META-INF</directory>
+ <includes>
+ <include>MANIFEST.MF</include>
+ </includes>
+ <targetPath>/META-INF</targetPath>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ </manifest>
+ <manifestEntries>
+ </manifestEntries>
+ <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache.org</id>
+ <name>Apache Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>org.eclipse.core</id>
+ <name>Maven Eclipse Repository</name>
+ <url>http://repo1.maven.org/eclipse-staging/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>org.eclipse.jdt</id>
+ <name>Maven Eclipse Repository</name>
+ <url>http://repo1.maven.org/eclipse-staging/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>org.eclipse</id>
+ <name>Maven Eclipse Repository</name>
+ <url>http://repo1.maven.org/eclipse-staging/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
+
Copied: trunk/tools/jbossesb/src/main/java/org (from rev 42, trunk/tools/jbossesb/src/org)
15 years, 10 months
Overlord SVN: r43 - trunk/samples.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-20 09:50:56 -0400 (Fri, 20 Jun 2008)
New Revision: 43
Modified:
trunk/samples/pom.xml
Log:
[SOAG-13]
* exclude this example out, otherwise build from top it requires to start the hsql db.
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2008-06-20 12:53:28 UTC (rev 42)
+++ trunk/samples/pom.xml 2008-06-20 13:50:56 UTC (rev 43)
@@ -16,7 +16,7 @@
</parent>
<modules>
- <module>jbossesb/purchasing/system</module>
+ <!--module>jbossesb/purchasing/system</module-->
</modules>
<build>
15 years, 10 months
Overlord SVN: r42 - in trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model: actions and 1 other directory.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-06-20 08:53:28 -0400 (Fri, 20 Jun 2008)
New Revision: 42
Modified:
trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/ESBLanguageModel.java
trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ParallelAction.java
trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ReceiveMessageAction.java
trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/SendMessageAction.java
Log:
Filter out parallel actions if no paths with interactions. Record location information with derived 'receive' and 'send' actions.
Modified: trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/ESBLanguageModel.java
===================================================================
--- trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/ESBLanguageModel.java 2008-06-20 11:58:43 UTC (rev 41)
+++ trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/ESBLanguageModel.java 2008-06-20 12:53:28 UTC (rev 42)
@@ -272,6 +272,10 @@
props.put(ModelListener.REFERENCE_MODEL, m_source);
props.put(ModelListener.REFERENCE_MODEL_START_POSITION, src.getSource().getStartPosition());
props.put(ModelListener.REFERENCE_MODEL_END_POSITION, src.getSource().getEndPosition());
+ if (src.getSource().getComponent() != null) {
+ props.put(ModelListener.REFERENCE_MODEL_COMPONENT,
+ src.getSource().getComponent());
+ }
m_listener.error(src, mesg, props);
}
@@ -285,6 +289,10 @@
props.put(ModelListener.REFERENCE_MODEL, m_source);
props.put(ModelListener.REFERENCE_MODEL_START_POSITION, src.getSource().getStartPosition());
props.put(ModelListener.REFERENCE_MODEL_END_POSITION, src.getSource().getEndPosition());
+ if (src.getSource().getComponent() != null) {
+ props.put(ModelListener.REFERENCE_MODEL_COMPONENT,
+ src.getSource().getComponent());
+ }
m_listener.warning(src, mesg, props);
}
Modified: trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ParallelAction.java
===================================================================
--- trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ParallelAction.java 2008-06-20 11:58:43 UTC (rev 41)
+++ trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ParallelAction.java 2008-06-20 12:53:28 UTC (rev 42)
@@ -90,13 +90,16 @@
String name=((org.w3c.dom.Element)n).getAttribute(SERVICE_NAME);
Block block=new Block();
- parallel.getBlocks().add(block);
ESBService service=getService().getModel().getService(category, name);
if (service != null) {
service.convert(block.getContents());
}
+
+ if (block.getContents().size() > 0) {
+ parallel.getBlocks().add(block);
+ }
} else if (n.getNodeName().equals(JOIN)) {
String category=((org.w3c.dom.Element)n).getAttribute(SERVICE_CATEGORY);
String name=((org.w3c.dom.Element)n).getAttribute(SERVICE_NAME);
@@ -111,6 +114,11 @@
}
}
}
+
+ // Only add parallel activity if it has paths
+ if (parallel.getBlocks().size() == 0) {
+ activities.remove(parallel);
+ }
}
}
Modified: trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ReceiveMessageAction.java
===================================================================
--- trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ReceiveMessageAction.java 2008-06-20 11:58:43 UTC (rev 41)
+++ trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/ReceiveMessageAction.java 2008-06-20 12:53:28 UTC (rev 42)
@@ -43,6 +43,8 @@
ConversationInteraction recv=new ConversationInteraction();
activities.add(recv);
+ recv.derivedFrom(this);
+
MessageSignature ms=new MessageSignature();
recv.setMessageSignature(ms);
@@ -66,6 +68,8 @@
ref.setLocalpart(local);
ref.setNamespace(ns);
+ ref.derivedFrom(this);
+
ms.getTypes().add(ref);
}
Modified: trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/SendMessageAction.java
===================================================================
--- trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/SendMessageAction.java 2008-06-20 11:58:43 UTC (rev 41)
+++ trunk/tools/jbossesb/src/org/jboss/internal/soa/overlord/jbossesb/model/actions/SendMessageAction.java 2008-06-20 12:53:28 UTC (rev 42)
@@ -104,6 +104,8 @@
ref.setLocalpart(local);
ref.setNamespace(ns);
+ ref.derivedFrom(this);
+
ms.getTypes().add(ref);
}
15 years, 10 months
Overlord SVN: r41 - in trunk/samples/jbossesb/purchasing: system and 1 other directory.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-20 07:58:43 -0400 (Fri, 20 Jun 2008)
New Revision: 41
Modified:
trunk/samples/jbossesb/purchasing/README.txt
trunk/samples/jbossesb/purchasing/system/pom.xml
Log:
[SOAG-13]
* update pom file
Modified: trunk/samples/jbossesb/purchasing/README.txt
===================================================================
--- trunk/samples/jbossesb/purchasing/README.txt 2008-06-20 11:30:06 UTC (rev 40)
+++ trunk/samples/jbossesb/purchasing/README.txt 2008-06-20 11:58:43 UTC (rev 41)
@@ -1,16 +1,23 @@
The Purchasing example.
-
Required to run the Purchasing example:
- ANT
+- Maven
- JBoss AS 4.2.1 or higher with the JBoss ESB SAR deployment (jbossesb.sar).
Settings required to edit before running:
-File: system/build.xml
-- Update the "deployer.dir" to your JBossAS server directory.
+File: system/pom.xml
+- Update the "deploy.dir" to your JBossAS server directory.
+-- Notice Before jbossesb-rosetta.jar and jbossesb-config-model.jar get published in jboss maven repository, you need to install these two artifacts into
+your local repository by using following commands:
+mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id>
+ -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
+
+Here we are using jbossesb-rosetta 4.2.1 version, jbossesb-config-model 1.0.1 version.
+
Running instructions:
------------------------------------------------
To run the purchasing, follow these steps:
@@ -19,12 +26,10 @@
2 - from the $JBossAS, execute the command to start the ESB: "bin/run.sh", or "bin/run.bat" for windows.
-3 - from the $Purchasing/system, execute the command to deploy the "Purchasing system": "ant deploy"
-* this should deploy the ESB file to your JBoss AS server/default.
-
3 - from the $Purchasing/system execute the command to start the Hsql database: "ant startdb".
-4 - start another window/shell, from the $Purchasing/system execute the command to export the schemas to db: "ant schemaexport".
+4 - Open up another shell, from the $Purchasing/system, execute the command to deploy the "Purchasing system": "mvn install"
+* this should deploy the ESB archive to your JBoss AS server/default.
5 - from the $Purchasing/client, execute the command to run the client: "ant runClient"
You will see the "<BuyResponse id="5"></BuyResponse>" in the client console.
Modified: trunk/samples/jbossesb/purchasing/system/pom.xml
===================================================================
--- trunk/samples/jbossesb/purchasing/system/pom.xml 2008-06-20 11:30:06 UTC (rev 40)
+++ trunk/samples/jbossesb/purchasing/system/pom.xml 2008-06-20 11:58:43 UTC (rev 41)
@@ -43,6 +43,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<version>${hibernate-tools-version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
15 years, 10 months
Overlord SVN: r40 - in trunk/samples: jbossesb and 1 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-20 07:30:06 -0400 (Fri, 20 Jun 2008)
New Revision: 40
Added:
trunk/samples/jbossesb/
trunk/samples/jbossesb/broker/
trunk/samples/jbossesb/purchasing/
Removed:
trunk/samples/esb/
trunk/samples/jbossesb/broker/
trunk/samples/jbossesb/purchasing/
trunk/samples/jbossesb/purchasing/system/lib/
Modified:
trunk/samples/pom.xml
Log:
rename the "esb" to "jbossesb" in samples folder.
Copied: trunk/samples/jbossesb (from rev 36, trunk/samples/esb)
Copied: trunk/samples/jbossesb/broker (from rev 39, trunk/samples/esb/broker)
Copied: trunk/samples/jbossesb/purchasing (from rev 39, trunk/samples/esb/purchasing)
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2008-06-20 11:26:10 UTC (rev 39)
+++ trunk/samples/pom.xml 2008-06-20 11:30:06 UTC (rev 40)
@@ -16,7 +16,7 @@
</parent>
<modules>
- <module>esb/purchasing/system</module>
+ <module>jbossesb/purchasing/system</module>
</modules>
<build>
15 years, 10 months
Overlord SVN: r39 - in trunk: distribution and 6 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-20 07:26:10 -0400 (Fri, 20 Jun 2008)
New Revision: 39
Added:
trunk/distribution/
trunk/distribution/install/
trunk/distribution/lib/
trunk/samples/esb/purchasing/system/pom.xml
trunk/samples/esb/purchasing/system/src/main/resources/META-INF/
trunk/samples/esb/purchasing/system/src/main/resources/META-INF/deployment.xml
trunk/samples/esb/purchasing/system/src/main/resources/META-INF/jboss-esb.xml
trunk/samples/pom.xml
Removed:
trunk/install/
trunk/lib/
trunk/samples/esb/purchasing/system/.classpath
trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml
trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml
trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml
trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml
Modified:
trunk/pom.xml
trunk/runtime/jbossesb/pom.xml
trunk/runtime/pom.xml
trunk/samples/esb/purchasing/system/build.xml
trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml
trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml
Log:
[SOAG-13]
* Update the maven pom file
* restrcture the install& lib folder.
Copied: trunk/distribution/install (from rev 36, trunk/install)
Copied: trunk/distribution/lib (from rev 36, trunk/lib)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/pom.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -33,11 +33,6 @@
<properties>
<overlord-version>1.0-SNAPSHOT</overlord-version>
- <hibernate-version>3.2.4.sp1</hibernate-version>
- <hibernate-annotation-version>3.2.1.GA</hibernate-annotation-version>
- <ejb3-persistence-version>1.0.1.GA</ejb3-persistence-version>
- <hibernate-commons-annotation>3.0.0.GA</hibernate-commons-annotation>
- <hibernate-tools>3.2.0.GA</hibernate-tools>
</properties>
<profiles>
@@ -133,10 +128,6 @@
<include>**/*TestCase.java</include>
<include>**/*Test.java</include>
</includes>
- <!--excludes>
- <exclude>**/Abstract*TestCase.java</exclude>
- <exclude>**/Abstract*Test.java</exclude>
- </excludes-->
</configuration>
</plugin>
<!--
@@ -173,14 +164,6 @@
</plugin>
</plugins>
</build>
- <!--
- This section defines the default dependency settings inherited by child projects.
- Note that this section does not add dependencies, but rather provide default settings.
- -->
- <dependencyManagement>
- <dependencies>
- </dependencies>
- </dependencyManagement>
<reporting>
<plugins>
@@ -202,19 +185,20 @@
<url>http://snapshots.jboss.org/maven2</url>
</repository>
- <repository>
- <id>maven.repo</id>
- <name>maven repository</name>
- <url>http://repo1.maven.org/maven2</url>
- </repository>
+ <repository>
+ <id>maven.repo</id>
+ <name>maven repository</name>
+ <url>http://repo1.maven.org/maven2</url>
+ </repository>
- <repository>
- <id>ibiblio</id>
- <name>ibiblio repository</name>
- <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
- </repository>
+ <repository>
+ <id>ibiblio</id>
+ <name>ibiblio repository</name>
+ <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
+ </repository>
</repositories>
+
<distributionManagement>
<repository>
<!-- Copy the distribution jar file to a local checkout of the maven repository
@@ -223,5 +207,6 @@
<url>file://${jboss.repository.root}</url>
</repository>
</distributionManagement>
+
</project>
Modified: trunk/runtime/jbossesb/pom.xml
===================================================================
--- trunk/runtime/jbossesb/pom.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/runtime/jbossesb/pom.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -6,7 +6,7 @@
<artifactId>runtime-jbossesb</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>JBoss Overlord - Runtime - JBossESB</name>
+ <name>Overlord::Runtime::JBossESB</name>
<url>http://www.jboss.org/overlord</url>
<parent>
@@ -19,8 +19,6 @@
<hibernate-version>3.2.4.sp1</hibernate-version>
<hibernate-annotations-version>3.2.1.ga</hibernate-annotations-version>
<ejb3-persistence-version>1.0.1.GA</ejb3-persistence-version>
- <hibernate-commons-annotations>3.0.0.ga</hibernate-commons-annotations>
- <hibernate-tools-version>3.2.0.ga</hibernate-tools-version>
</properties>
<dependencies>
@@ -55,15 +53,10 @@
<version>${ejb3-persistence-version}</version>
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-commons-annotations</artifactId>
- <version>${hibernate-commons-annotations}</version>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ <version>0.9.1</version>
</dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tools</artifactId>
- <version>${hibernate-tools-version}</version>
- </dependency>
</dependencies>
<reporting>
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/runtime/pom.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -6,7 +6,7 @@
<artifactId>runtime</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
- <name>JBoss Overlord - Runtime</name>
+ <name>Overlord::Runtime</name>
<url>http://www.jboss.org/overlord</url>
<parent>
Deleted: trunk/samples/esb/purchasing/system/.classpath
===================================================================
--- trunk/samples/esb/purchasing/system/.classpath 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/.classpath 2008-06-20 11:26:10 UTC (rev 39)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lib/jbossesb-config-model-1.0.1.jar"/>
- <classpathentry kind="lib" path="lib/jbossesb-rosetta.jar"/>
- <classpathentry kind="lib" path="lib/log4j.jar"/>
- <classpathentry kind="lib" path="lib/org.pi4soa.common.jar"/>
- <classpathentry kind="lib" path="lib/org.pi4soa.jbossesb.jar"/>
- <classpathentry kind="output" path="classes"/>
-</classpath>
Modified: trunk/samples/esb/purchasing/system/build.xml
===================================================================
--- trunk/samples/esb/purchasing/system/build.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/build.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -1,24 +1,11 @@
-<project name="purchasing" default="deploy" basedir=".">
-
- <property name="deploy.dir" value="/var/local/jboss-4.2.2.GA/server/default/deploy" />
-
- <property name="build.dir" value="${basedir}/build" />
- <property name="dist.dir" value="${build.dir}/dist" />
- <property name="classes.dir" value="${build.dir}/classes" />
- <property name="src.dir" value="${basedir}/src" />
- <property name="conf.dir" value="${basedir}/conf" />
+<project name="purchasing" default="startdb" basedir=".">
+ <property name="M2_REPO" value="/opt/m2/repo" />
<property name="database.dir" value="${basedir}/database" />
- <property name="jms.service.file" value="jbmq-queue-service.xml"/>
- <path id="project.classpath">
- <fileset dir="${basedir}/lib">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="${basedir}/lib/hibernate">
- <include name="**/*.jar" />
- <exclude name="**/hibernate-tools.jar" />
- <exclude name="**/hibernation-commons-annotations.jar" />
- </fileset>
+ <path id="database.classpath">
+ <fileset dir="${M2_REPO}" >
+ <include name="hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar" />
+ </fileset>
</path>
<!-- Start the HSQL DB server -->
@@ -27,7 +14,7 @@
<delete dir="${database.dir}"/>
<java classname="org.hsqldb.Server"
fork="yes"
- classpathref="project.classpath"
+ classpathref="database.classpath"
failonerror="true">
<arg value="-database.0"/>
<arg value="file:${database.dir}/db"/>
@@ -39,7 +26,7 @@
<java
classname="org.hsqldb.util.DatabaseManagerSwing"
fork="yes"
- classpathref="project.classpath"
+ classpathref="database.classpath"
failonerror="true">
<arg value="-url"/>
<arg value="jdbc:hsqldb:hsql://localhost/"/>
@@ -47,72 +34,5 @@
<arg value="org.hsqldb.jdbcDriver"/>
</java>
</target>
-
-
- <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
- classpathref="project.classpath"/>
-
- <target name="schemaexport" depends="compile"
- description="Exports a generated schema to DB and file">
- <hibernatetool destdir="${basedir}">
- <classpath>
- <pathelement path="${project.classpath}" />
- <path location="${classes.dir}" />
- </classpath>
- <annotationconfiguration configurationfile="${classes.dir}/hibernate.cfg.xml" />
- <hbm2ddl
- create="true"
- drop="true"
- export="true"
- outputfilename="purchasing-ddl.sql"
- delimiter=";"
- format="true"/>
- </hibernatetool>
- </target>
-
- <!-- Clean up -->
- <target name="clean">
- <delete dir="${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${classes.dir}" />
- </target>
-
- <target name="copymetafiles">
- <copy todir="${classes.dir}">
- <fileset dir="${conf.dir}">
- <include name="hibernate.cfg.xml"/>
- </fileset>
- </copy>
- </target>
-
- <!-- Compile Java source -->
- <target name="compile" depends="clean,copymetafiles">
- <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true">
- <classpath refid="project.classpath"/>
- </javac>
- </target>
-
- <target name="deploy" depends="compile" >
-
- <mkdir dir="${dist.dir}" />
- <copy todir="${basedir}/build/META-INF">
- <fileset dir="conf" includes="jboss-esb.xml,deployment.xml" />
- </copy>
-
- <jar destfile="${dist.dir}/purchasing.esb">
- <fileset dir="${classes.dir}" />
- <fileset dir="${build.dir}" includes="META-INF/**" />
- <fileset dir="${basedir}/conf" >
- <include name="${jms.service.file}" />
- </fileset>
- <fileset dir="${basedir}/lib/hibernate">
- <include name="**/hibernate-commons-annotations.jar" />
- </fileset>
- </jar>
-
- <copy file="${dist.dir}/purchasing.esb" todir="${deploy.dir}" overwrite="true" />
-
- </target>
-
</project>
Added: trunk/samples/esb/purchasing/system/pom.xml
===================================================================
--- trunk/samples/esb/purchasing/system/pom.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/pom.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -0,0 +1,121 @@
+<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.samples</groupId>
+ <artifactId>jbossesb-purchasing</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jboss-esb</packaging>
+ <name>Overlord::Samples::Purchasing</name>
+ <url>http://www.jboss.org/overlord</url>
+
+ <parent>
+ <groupId>org.jboss.soa.overlord</groupId>
+ <artifactId>samples</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <hibernate-commons-annotations>3.0.0.ga</hibernate-commons-annotations>
+ <hibernate-tools-version>3.2.0.ga</hibernate-tools-version>
+ <hsqldb-version>1.8.0.7</hsqldb-version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.overlord</groupId>
+ <artifactId>runtime-jbossesb</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>${hibernate-commons-annotations}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tools</artifactId>
+ <version>${hibernate-tools-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>${hsqldb-version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>purchasing</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!--export schemas to database -->
+ <execution>
+ <id>schemaexport</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="maven.compile.classpath"/>
+ <hibernatetool destdir=".">
+ <classpath>
+ <pathelement path="maven.compile.classpath" />
+ </classpath>
+ <annotationconfiguration configurationfile="target/classes/hibernate.cfg.xml" />
+ <hbm2ddl
+ create="true"
+ drop="true"
+ export="true"
+ outputfilename="purchasing-ddl.sql"
+ delimiter=";"
+ format="true"/>
+ </hibernatetool>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <!--Deploy esb artifact to JBoss AS/ESB -->
+ <execution>
+ <id>deploy</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <property name="deploy.dir" value="/var/local/jboss-4.2.2.GA/server/default/deploy" />
+ <copy file="target/purchasing.esb" todir="${deploy.dir}" overwrite="true" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
+
Copied: trunk/samples/esb/purchasing/system/src/main/resources/META-INF/deployment.xml (from rev 38, trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/META-INF/deployment.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/META-INF/deployment.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -0,0 +1,14 @@
+<jbossesb-deployment>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker_reply</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker1</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker2</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker3</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker4</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker5</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker6</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker7</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency1</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency2</depends>
+</jbossesb-deployment>
Copied: trunk/samples/esb/purchasing/system/src/main/resources/META-INF/jboss-esb.xml (from rev 38, trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/META-INF/jboss-esb.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/META-INF/jboss-esb.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -0,0 +1,357 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<!--
+ 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,
+-->
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
+ parameterReloadSecs="5000">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost">
+ <jms-bus busid="BrokerService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker" />
+ </jms-bus>
+ <jms-bus busid="BrokerService1">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker1" />
+ </jms-bus>
+ <jms-bus busid="BrokerService2">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker2"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService3">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker3"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService4">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker4"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService5">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker5"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService6">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker6"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService7">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker7"/>
+ </jms-bus>
+ <jms-bus busid="CreditAgencyService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency" />
+ </jms-bus>
+ <jms-bus busid="CreditAgencyService1">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency1" />
+ </jms-bus>
+ <jms-bus busid="CreditAgencyService2">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency2" />
+ </jms-bus>
+ </jms-provider>
+
+ </providers>
+ <services>
+
+ <service category="PurchaseGoods.Broker" name="Broker.main" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ process="process" name="a1">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="a2">
+ <property name="operation" value="buy" />
+ <property name="messageType" value="BuyRequest" />
+ <property name="clientEPR" value="client" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="com.acme.services.broker.SetCreditCheckRequestMessageAction"
+ process="process" name="a3">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="a4">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckRequest" />
+ <property name="serviceName" value="CreditAgency.main" />
+ <property name="serviceCategory" value="PurchaseGoods.CreditAgency" />
+ <property name="responseServiceName" value="CreditResponse" />
+ <property name="responseServiceCategory" value="PurchaseGoods.Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="CreditResponse" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService2"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.RetrieveSessionAction"
+ process="process" name="b1">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ <property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Broker" />
+ <property name="serviceName" value="CreditResponse" />
+ <property name="serviceCategory" value="PurchaseGoods.Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction"
+ process="process" name="b2">
+ <property name="paths">
+ <case service-category="PurchaseGoods.Broker"
+ service-name="CreditResponse1" >
+ <message type="CreditCheckResponse" />
+ </case>
+ <case service-category="PurchaseGoods.Broker"
+ service-name="CreditResponse2" >
+ <message type="CreditCheckInvalid" />
+ </case>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="CreditResponse1" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService3"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="b4">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckResponse" />
+ <property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ParallelAction"
+ process="process" name="b5">
+ <property name="paths">
+ <path service-category="PurchaseGoods.Broker"
+ service-name="BrokerBranch1"
+ immediate="true" />
+ <path service-category="PurchaseGoods.Broker"
+ service-name="BrokerBranch2"
+ immediate="true" />
+ <join service-category="PurchaseGoods.Broker"
+ service-name="ReturnBuyerResponse" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="BrokerBranch1" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService4"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ process="process" name="b7">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ <property name="serviceName" value="ReturnBuyerResponse" />
+ <property name="serviceCategory" value="PurchaseGoods.Broker" />
+ <property name="immediate" value="false" />
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="BrokerBranch2" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService5"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ process="process" name="b9">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ <property name="serviceName" value="ReturnBuyerResponse" />
+ <property name="serviceCategory" value="PurchaseGoods.Broker" />
+ <property name="immediate" value="false" />
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="ReturnBuyerResponse" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService6"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.acme.services.broker.SetBuyResponseMessageAction"
+ process="process" name="b11">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="b12">
+ <property name="operation" value="buy" />
+ <property name="messageType" value="BuyResponse" />
+ <property name="clientEPR" value="client" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="CreditResponse2" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService7"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="b14">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckInvalid" />
+ <property name="ReceiveMessageAction" value="{http://www.jboss.org/overlord/purchase}Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="com.acme.services.broker.SetBuyFailedMessageAction"
+ process="process" name="b15">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="b16">
+ <property name="operation" value="buy" />
+ <property name="faultName" value="BuyFailed" />
+ <property name="messageType" value="BuyFailed" />
+ <property name="clientEPR" value="client" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.CreditAgency" name="CreditAgency.main" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="CreditAgencyService"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ process="process" name="c1">
+ <property name="session" value="com.acme.services.creditAgency.CreditAgencyPurchase" />
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="c2">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckRequest" />
+ <property name="clientEPR" value="broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.IfAction"
+ process="process" name="c3">
+ <property name="paths">
+ <if decision-method="isCreditValid"
+ service-category="PurchaseGoods.CreditAgency"
+ service-name="CreditAgency.decision1"
+ immediate="true" />
+ <else service-category="PurchaseGoods.CreditAgency"
+ service-name="CreditAgency.decision2"
+ immediate="true" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.CreditAgency" name="CreditAgency.decision1" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="CreditAgencyService1"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.acme.services.creditAgency.SetCreditCheckResponseMessageAction"
+ process="process" name="d2">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="d3">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckResponse" />
+ <property name="clientEPR" value="broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.CreditAgency" name="CreditAgency.decision2" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="CreditAgencyService2"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.acme.services.creditAgency.SetCreditCheckInvalidMessageAction"
+ process="process" name="e2">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="e3">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckInvalid" />
+ <property name="clientEPR" value="broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Deleted: trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -1,14 +0,0 @@
-<jbossesb-deployment>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker_reply</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker1</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker2</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker3</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker4</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker5</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker6</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker7</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency1</depends>
- <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency2</depends>
-</jbossesb-deployment>
Modified: trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -58,4 +58,4 @@
<mapping class="com.acme.services.creditAgency.CreditAgencyPurchase" />
</session-factory>
-</hibernate-configuration>
\ No newline at end of file
+</hibernate-configuration>
Deleted: trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker_reply"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker1"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker2"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker3"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker4"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker5"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker6"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker7"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-creditAgency"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-creditAgency1"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.trailblazer.destination:service=Queue,name=esb-creditAgency2"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-</server>
Deleted: trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -1,357 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<!--
- 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,
--->
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
- parameterReloadSecs="5000">
-
- <providers>
- <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
- <jms-bus busid="BrokerService">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker" />
- </jms-bus>
- <jms-bus busid="BrokerService1">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker1" />
- </jms-bus>
- <jms-bus busid="BrokerService2">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker2"/>
- </jms-bus>
- <jms-bus busid="BrokerService3">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker3"/>
- </jms-bus>
- <jms-bus busid="BrokerService4">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker4"/>
- </jms-bus>
- <jms-bus busid="BrokerService5">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker5"/>
- </jms-bus>
- <jms-bus busid="BrokerService6">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker6"/>
- </jms-bus>
- <jms-bus busid="BrokerService7">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker7"/>
- </jms-bus>
- <jms-bus busid="CreditAgencyService">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency" />
- </jms-bus>
- <jms-bus busid="CreditAgencyService1">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency1" />
- </jms-bus>
- <jms-bus busid="CreditAgencyService2">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency2" />
- </jms-bus>
- </jms-provider>
-
- </providers>
- <services>
-
- <service category="PurchaseGoods.Broker" name="Broker.main" description="">
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
- process="process" name="a1">
- <property name="session" value="com.acme.services.broker.PurchaseGoods" />
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
- process="process" name="a2">
- <property name="operation" value="buy" />
- <property name="messageType" value="BuyRequest" />
- <property name="clientEPR" value="client" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- <action class="com.acme.services.broker.SetCreditCheckRequestMessageAction"
- process="process" name="a3">
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
- process="process" name="a4">
- <property name="operation" value="checkCredit" />
- <property name="messageType" value="CreditCheckRequest" />
- <property name="serviceName" value="CreditAgency.main" />
- <property name="serviceCategory" value="PurchaseGoods.CreditAgency" />
- <property name="responseServiceName" value="CreditResponse" />
- <property name="responseServiceCategory" value="PurchaseGoods.Broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.Broker" name="CreditResponse" description="" >
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService2"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.RetrieveSessionAction"
- process="process" name="b1">
- <property name="session" value="com.acme.services.broker.PurchaseGoods" />
- <property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Broker" />
- <property name="serviceName" value="CreditResponse" />
- <property name="serviceCategory" value="PurchaseGoods.Broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction"
- process="process" name="b2">
- <property name="paths">
- <case service-category="PurchaseGoods.Broker"
- service-name="CreditResponse1" >
- <message type="CreditCheckResponse" />
- </case>
- <case service-category="PurchaseGoods.Broker"
- service-name="CreditResponse2" >
- <message type="CreditCheckInvalid" />
- </case>
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.Broker" name="CreditResponse1" description="" >
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService3"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
- process="process" name="b4">
- <property name="operation" value="checkCredit" />
- <property name="messageType" value="CreditCheckResponse" />
- <property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ParallelAction"
- process="process" name="b5">
- <property name="paths">
- <path service-category="PurchaseGoods.Broker"
- service-name="BrokerBranch1"
- immediate="true" />
- <path service-category="PurchaseGoods.Broker"
- service-name="BrokerBranch2"
- immediate="true" />
- <join service-category="PurchaseGoods.Broker"
- service-name="ReturnBuyerResponse" />
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.Broker" name="BrokerBranch1" description="" >
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService4"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
- process="process" name="b7">
- <property name="session" value="com.acme.services.broker.PurchaseGoods" />
- <property name="serviceName" value="ReturnBuyerResponse" />
- <property name="serviceCategory" value="PurchaseGoods.Broker" />
- <property name="immediate" value="false" />
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.Broker" name="BrokerBranch2" description="" >
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService5"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
- process="process" name="b9">
- <property name="session" value="com.acme.services.broker.PurchaseGoods" />
- <property name="serviceName" value="ReturnBuyerResponse" />
- <property name="serviceCategory" value="PurchaseGoods.Broker" />
- <property name="immediate" value="false" />
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.Broker" name="ReturnBuyerResponse" description="" >
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService6"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="com.acme.services.broker.SetBuyResponseMessageAction"
- process="process" name="b11">
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
- process="process" name="b12">
- <property name="operation" value="buy" />
- <property name="messageType" value="BuyResponse" />
- <property name="clientEPR" value="client" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.Broker" name="CreditResponse2" description="" >
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="BrokerService7"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
- process="process" name="b14">
- <property name="operation" value="checkCredit" />
- <property name="messageType" value="CreditCheckInvalid" />
- <property name="ReceiveMessageAction" value="{http://www.jboss.org/overlord/purchase}Broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- <action class="com.acme.services.broker.SetBuyFailedMessageAction"
- process="process" name="b15">
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
- process="process" name="b16">
- <property name="operation" value="buy" />
- <property name="faultName" value="BuyFailed" />
- <property name="messageType" value="BuyFailed" />
- <property name="clientEPR" value="client" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.CreditAgency" name="CreditAgency.main" description="">
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="CreditAgencyService"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
- process="process" name="c1">
- <property name="session" value="com.acme.services.creditAgency.CreditAgencyPurchase" />
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
- process="process" name="c2">
- <property name="operation" value="checkCredit" />
- <property name="messageType" value="CreditCheckRequest" />
- <property name="clientEPR" value="broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.IfAction"
- process="process" name="c3">
- <property name="paths">
- <if decision-method="isCreditValid"
- service-category="PurchaseGoods.CreditAgency"
- service-name="CreditAgency.decision1"
- immediate="true" />
- <else service-category="PurchaseGoods.CreditAgency"
- service-name="CreditAgency.decision2"
- immediate="true" />
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.CreditAgency" name="CreditAgency.decision1" description="">
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="CreditAgencyService1"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="com.acme.services.creditAgency.SetCreditCheckResponseMessageAction"
- process="process" name="d2">
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
- process="process" name="d3">
- <property name="operation" value="checkCredit" />
- <property name="messageType" value="CreditCheckResponse" />
- <property name="clientEPR" value="broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- </actions>
- </service>
-
- <service category="PurchaseGoods.CreditAgency" name="CreditAgency.decision2" description="">
- <listeners>
- <jms-listener name="BrokerServiceListener"
- busidref="CreditAgencyService2"
- maxThreads="1"/>
- </listeners>
- <actions mep="OneWay">
- <action class="com.acme.services.creditAgency.SetCreditCheckInvalidMessageAction"
- process="process" name="e2">
- </action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
- process="process" name="e3">
- <property name="operation" value="checkCredit" />
- <property name="messageType" value="CreditCheckInvalid" />
- <property name="clientEPR" value="broker" />
- <property name="identities" >
- <identity type="primary" >
- <token name="id" locator="//@id" />
- </identity>
- </property>
- </action>
- </actions>
- </service>
- </services>
-
-</jbossesb>
Deleted: trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- JBoss, Home of Professional Open Source
- Copyright 2006, 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) 2005-2006,
- @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
- These options are described in the JBossESB manual.
- Defaults are provided here for convenience only.
-
- Please read through this file prior to using the system, and consider
- updating the specified entries.
--->
-<esb
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
- <properties name="core">
- <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
- <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
- <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
- </properties>
- <properties name="registry">
- <property name="org.jboss.soa.esb.registry.queryManagerURI"
- value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
- <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
- value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
- <property name="org.jboss.soa.esb.registry.implementationClass"
- value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
- <property name="org.jboss.soa.esb.registry.factoryClass"
- value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
- <property name="org.jboss.soa.esb.registry.user"
- value="jbossesb"/>
- <property name="org.jboss.soa.esb.registry.password"
- value="password"/>
- <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
- <property name="org.jboss.soa.esb.scout.proxy.transportClass"
- value="org.apache.ws.scout.transport.RMITransport"/>
- </properties>
- <properties name="transports" depends="core">
- <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
- <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
- <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
- <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
- </properties>
- <properties name="connection">
- <property name="min-pool-size" value="5"/>
- <property name="max-pool=size" value="10"/>
- <property name="blocking-timeout-millis" value="5000"/>
- <property name="abandoned-connection-timeout" value="10000"/>
- <property name="abandoned-connection-time-interval" value="30000"/>
- </properties>
- <properties name="dbstore">
- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
-
- <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
- <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
- <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
- <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
- <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
- <!--table managed by pool to test for valid connections - created by pool automatically -->
- <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
- <!-- # of milliseconds to timeout waiting for a connection from pool -->
- <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
- </properties>
- <properties name="messagerouting">
- <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
- </properties>
-</esb>
Modified: trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml 2008-06-20 03:39:06 UTC (rev 38)
+++ trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -21,9 +21,9 @@
<!-- ================================= -->
<!-- A time/date based rolling appender -->
- <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="./trailblazer.log"/>
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <!--errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/-->
+ <param name="File" value="./purchasing.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
@@ -62,7 +62,7 @@
<!-- ============================== -->
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <!--errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/-->
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
@@ -204,9 +204,6 @@
<category name="org.milyn.cdr.XMLConfigDigester">
<priority value="INFO"/>
</category>
- <category name="org.jboss.soa.esb.samples.trailblazer">
- <priority value="INFO"/>
- </category>
<!-- ======================= -->
@@ -214,6 +211,7 @@
<!-- ======================= -->
<root>
+ <priority value="INFO" />
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
Added: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml (rev 0)
+++ trunk/samples/pom.xml 2008-06-20 11:26:10 UTC (rev 39)
@@ -0,0 +1,47 @@
+<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</groupId>
+ <artifactId>samples</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Overlord::Samples</name>
+ <url>http://www.jboss.org/overlord</url>
+
+ <parent>
+ <groupId>org.jboss.soa.overlord</groupId>
+ <artifactId>overlord</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <modules>
+ <module>esb/purchasing/system</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-20080130.110241-9</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots/>
+ <id>jboss-plugin-snapshots</id>
+ <name>JBoss Snapshot Plugin Repository</name>
+ <url>http://snapshots.repository.codehaus.org</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+
+</project>
+
15 years, 10 months
Overlord SVN: r38 - in trunk: samples/esb/purchasing/system and 4 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-19 23:39:06 -0400 (Thu, 19 Jun 2008)
New Revision: 38
Added:
trunk/samples/esb/purchasing/system/src/main/
trunk/samples/esb/purchasing/system/src/main/java/
trunk/samples/esb/purchasing/system/src/main/java/com/
trunk/samples/esb/purchasing/system/src/main/resources/
trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml
trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml
trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml
trunk/samples/esb/purchasing/system/src/main/resources/jbmq-queue-service.xml
trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml
trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml
trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml
Removed:
trunk/samples/esb/purchasing/system/conf/
trunk/samples/esb/purchasing/system/src/com/
Modified:
trunk/pom.xml
Log:
[SOAG-13]
* mavenized sample.
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-06-19 12:57:31 UTC (rev 37)
+++ trunk/pom.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -28,6 +28,7 @@
</developers>
<modules>
<module>runtime</module>
+ <module>samples</module>
</modules>
<properties>
Copied: trunk/samples/esb/purchasing/system/src/main/java/com (from rev 36, trunk/samples/esb/purchasing/system/src/com)
Copied: trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/deployment.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/deployment.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,14 @@
+<jbossesb-deployment>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker_reply</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker1</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker2</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker3</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker4</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker5</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker6</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-broker7</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency1</depends>
+ <depends>jboss.esb.gen.destination:service=Queue,name=esb-creditAgency2</depends>
+</jbossesb-deployment>
Copied: trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/hibernate.cfg.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/hibernate.cfg.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,61 @@
+<!DOCTYPE hibernate-configuration SYSTEM
+"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<!--
+ 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,
+ @author JBoss Inc.
+-->
+<hibernate-configuration>
+ <session-factory>
+ <property name="hibernate.connection.driver_class">
+ org.hsqldb.jdbcDriver
+ </property>
+ <property name="hibernate.connection.url">
+ jdbc:hsqldb:hsql://localhost
+ </property>
+ <property name="hibernate.connection.username">
+ sa
+ </property>
+ <property name="hibernate.dialect">
+ org.hibernate.dialect.HSQLDialect
+ </property>
+
+ <!-- Use the C3P0 connection pool provider -->
+ <property name="hibernate.c3p0.min_size">5</property>
+ <property name="hibernate.c3p0.max_size">20</property>
+ <property name="hibernate.c3p0.timeout">300</property>
+ <property name="hibernate.c3p0.max_statements">50</property>
+ <property name="hibernate.c3p0.idle_test_period">3000</property>
+
+ <!-- Show and print nice SQL on stdout -->
+ <property name="show_sql">false</property>
+ <property name="format_sql">true</property>
+
+ <!-- List of annotationed classes (Internal conversation class)-->
+ <mapping class="org.jboss.soa.overlord.conversation.Session" />
+ <mapping class="org.jboss.soa.overlord.conversation.ScheduleItem"/>
+ <mapping class="org.jboss.soa.overlord.conversation.JoinState"/>
+ <mapping class="org.jboss.soa.overlord.conversation.Identity"/>
+ <mapping class="org.jboss.soa.overlord.conversation.EPRWrapper"/>
+
+ <!-- List of Business State class -->
+ <mapping class="com.acme.services.broker.PurchaseGoods" />
+ <mapping class="com.acme.services.creditAgency.CreditAgencyPurchase" />
+
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
Copied: trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/jbm-queue-service.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jbm-queue-service.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker1"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker2"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker3"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker4"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker5"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker6"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-broker7"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-creditAgency"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-creditAgency1"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.trailblazer.destination:service=Queue,name=esb-creditAgency2"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Copied: trunk/samples/esb/purchasing/system/src/main/resources/jbmq-queue-service.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/jbmq-queue-service.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jbmq-queue-service.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jbmq-queue-service.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker1">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker2">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker3">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker4">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker5">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker6">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-broker7">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-creditAgency">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-creditAgency1">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-creditAgency2">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+
+</server>
Copied: trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/jboss-esb.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jboss-esb.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,357 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<!--
+ 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,
+-->
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
+ parameterReloadSecs="5000">
+
+ <providers>
+ <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost">
+ <jms-bus busid="BrokerService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker" />
+ </jms-bus>
+ <jms-bus busid="BrokerService1">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker1" />
+ </jms-bus>
+ <jms-bus busid="BrokerService2">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker2"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService3">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker3"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService4">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker4"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService5">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker5"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService6">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker6"/>
+ </jms-bus>
+ <jms-bus busid="BrokerService7">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-broker7"/>
+ </jms-bus>
+ <jms-bus busid="CreditAgencyService">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency" />
+ </jms-bus>
+ <jms-bus busid="CreditAgencyService1">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency1" />
+ </jms-bus>
+ <jms-bus busid="CreditAgencyService2">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/esb-creditAgency2" />
+ </jms-bus>
+ </jms-provider>
+
+ </providers>
+ <services>
+
+ <service category="PurchaseGoods.Broker" name="Broker.main" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ process="process" name="a1">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="a2">
+ <property name="operation" value="buy" />
+ <property name="messageType" value="BuyRequest" />
+ <property name="clientEPR" value="client" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="com.acme.services.broker.SetCreditCheckRequestMessageAction"
+ process="process" name="a3">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="a4">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckRequest" />
+ <property name="serviceName" value="CreditAgency.main" />
+ <property name="serviceCategory" value="PurchaseGoods.CreditAgency" />
+ <property name="responseServiceName" value="CreditResponse" />
+ <property name="responseServiceCategory" value="PurchaseGoods.Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="CreditResponse" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService2"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.RetrieveSessionAction"
+ process="process" name="b1">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ <property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Broker" />
+ <property name="serviceName" value="CreditResponse" />
+ <property name="serviceCategory" value="PurchaseGoods.Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction"
+ process="process" name="b2">
+ <property name="paths">
+ <case service-category="PurchaseGoods.Broker"
+ service-name="CreditResponse1" >
+ <message type="CreditCheckResponse" />
+ </case>
+ <case service-category="PurchaseGoods.Broker"
+ service-name="CreditResponse2" >
+ <message type="CreditCheckInvalid" />
+ </case>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="CreditResponse1" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService3"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="b4">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckResponse" />
+ <property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ParallelAction"
+ process="process" name="b5">
+ <property name="paths">
+ <path service-category="PurchaseGoods.Broker"
+ service-name="BrokerBranch1"
+ immediate="true" />
+ <path service-category="PurchaseGoods.Broker"
+ service-name="BrokerBranch2"
+ immediate="true" />
+ <join service-category="PurchaseGoods.Broker"
+ service-name="ReturnBuyerResponse" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="BrokerBranch1" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService4"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ process="process" name="b7">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ <property name="serviceName" value="ReturnBuyerResponse" />
+ <property name="serviceCategory" value="PurchaseGoods.Broker" />
+ <property name="immediate" value="false" />
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="BrokerBranch2" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService5"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ process="process" name="b9">
+ <property name="session" value="com.acme.services.broker.PurchaseGoods" />
+ <property name="serviceName" value="ReturnBuyerResponse" />
+ <property name="serviceCategory" value="PurchaseGoods.Broker" />
+ <property name="immediate" value="false" />
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="ReturnBuyerResponse" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService6"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.acme.services.broker.SetBuyResponseMessageAction"
+ process="process" name="b11">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="b12">
+ <property name="operation" value="buy" />
+ <property name="messageType" value="BuyResponse" />
+ <property name="clientEPR" value="client" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.Broker" name="CreditResponse2" description="" >
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="BrokerService7"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="b14">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckInvalid" />
+ <property name="ReceiveMessageAction" value="{http://www.jboss.org/overlord/purchase}Broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="com.acme.services.broker.SetBuyFailedMessageAction"
+ process="process" name="b15">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="b16">
+ <property name="operation" value="buy" />
+ <property name="faultName" value="BuyFailed" />
+ <property name="messageType" value="BuyFailed" />
+ <property name="clientEPR" value="client" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.CreditAgency" name="CreditAgency.main" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="CreditAgencyService"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ process="process" name="c1">
+ <property name="session" value="com.acme.services.creditAgency.CreditAgencyPurchase" />
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ process="process" name="c2">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckRequest" />
+ <property name="clientEPR" value="broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.IfAction"
+ process="process" name="c3">
+ <property name="paths">
+ <if decision-method="isCreditValid"
+ service-category="PurchaseGoods.CreditAgency"
+ service-name="CreditAgency.decision1"
+ immediate="true" />
+ <else service-category="PurchaseGoods.CreditAgency"
+ service-name="CreditAgency.decision2"
+ immediate="true" />
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.CreditAgency" name="CreditAgency.decision1" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="CreditAgencyService1"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.acme.services.creditAgency.SetCreditCheckResponseMessageAction"
+ process="process" name="d2">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="d3">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckResponse" />
+ <property name="clientEPR" value="broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+
+ <service category="PurchaseGoods.CreditAgency" name="CreditAgency.decision2" description="">
+ <listeners>
+ <jms-listener name="BrokerServiceListener"
+ busidref="CreditAgencyService2"
+ maxThreads="1"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.acme.services.creditAgency.SetCreditCheckInvalidMessageAction"
+ process="process" name="e2">
+ </action>
+ <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ process="process" name="e3">
+ <property name="operation" value="checkCredit" />
+ <property name="messageType" value="CreditCheckInvalid" />
+ <property name="clientEPR" value="broker" />
+ <property name="identities" >
+ <identity type="primary" >
+ <token name="id" locator="//@id" />
+ </identity>
+ </property>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Copied: trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/jbossesb-properties.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/jbossesb-properties.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, 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) 2005-2006,
+ @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+ value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+ value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+ value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout" value="10000"/>
+ <property name="abandoned-connection-time-interval" value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+
+ <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool automatically -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Copied: trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml (from rev 36, trunk/samples/esb/purchasing/system/conf/log4j.xml)
===================================================================
--- trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml (rev 0)
+++ trunk/samples/esb/purchasing/system/src/main/resources/log4j.xml 2008-06-20 03:39:06 UTC (rev 38)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.10 2006/04/21 17:29:20 csuconic Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./trailblazer.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- A size based file rolling appender
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="${jboss.server.log.dir}/server.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ====================== -->
+ <!-- More Appender examples -->
+ <!-- ====================== -->
+
+ <!-- Buffer events and log them asynchronously
+ <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="SMTP"/>
+ </appender>
+ -->
+
+ <!-- EMail events to an administrator
+ <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Threshold" value="ERROR"/>
+ <param name="To" value="admin(a)myhost.domain.com"/>
+ <param name="From" value="nobody(a)myhost.domain.com"/>
+ <param name="Subject" value="JBoss Sever Errors"/>
+ <param name="SMTPHost" value="localhost"/>
+ <param name="BufferSize" value="10"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Syslog events
+ <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Facility" value="LOCAL7"/>
+ <param name="FacilityPrinting" value="true"/>
+ <param name="SyslogHost" value="localhost"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Log events to JMS (requires a topic to be created)
+ <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Threshold" value="ERROR"/>
+ <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
+ <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
+ </appender>
+ -->
+
+ <!-- Log events through SNMP
+ <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
+ <param name="ManagementHost" value="127.0.0.1"/>
+ <param name="ManagementHostTrapListenPort" value="162"/>
+ <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
+ <param name="LocalIPAddress" value="127.0.0.1"/>
+ <param name="LocalTrapSendPort" value="161"/>
+ <param name="GenericTrapType" value="6"/>
+ <param name="SpecificTrapType" value="12345678"/>
+ <param name="CommunityString" value="public"/>
+ <param name="ForwardStackTraceWithTrap" value="true"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Emit events as JMX notifications
+ <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+
+ <param name="Threshold" value="WARN"/>
+ <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+ <category name="org.apache">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
+ <category name="org.jboss.serial">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+ <category name="org.jgroups">
+ <priority value="WARN"/>
+ </category>
+
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <category name="jacorb">
+ <priority value="WARN"/>
+ </category>
+
+
+ <!-- Limit the JSR77 categories -->
+ <category name="org.jboss.management">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit Axis based webservice category -->
+ <category name="org.jboss.webservice">
+ <priority value="DEBUG"/>
+ </category>
+ <category name="org.jboss.axis">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="org.milyn">
+ <priority value="INFO"/>
+ </category>
+ <category name="org.milyn.delivery.SmooksXML">
+ <priority value="INFO"/>
+ </category>
+ <category name="org.milyn.delivery.serialize.Serializer">
+ <priority value="INFO"/>
+ </category>
+ <category name="org.milyn.cdr.XMLConfigDigester">
+ <priority value="INFO"/>
+ </category>
+ <category name="org.jboss.soa.esb.samples.trailblazer">
+ <priority value="INFO"/>
+ </category>
+
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+ <!-- Clustering logging -->
+ <!-- Uncomment the following to redirect the org.jgroups and
+ org.jboss.ha categories to a cluster.log file.
+
+ <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="${jboss.server.log.dir}/cluster.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+ <category name="org.jgroups">
+ <priority value="DEBUG" />
+ <appender-ref ref="CLUSTER"/>
+ </category>
+ <category name="org.jboss.ha">
+ <priority value="DEBUG" />
+ <appender-ref ref="CLUSTER"/>
+ </category>
+ -->
+
+</log4j:configuration>
15 years, 10 months
Overlord SVN: r37 - in trunk: runtime/jbossesb and 3 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-19 08:57:31 -0400 (Thu, 19 Jun 2008)
New Revision: 37
Added:
trunk/runtime/jbossesb/src/main/java/org/
trunk/runtime/jbossesb/src/main/java/org/jboss/
Removed:
trunk/runtime/jbossesb/src/main/java/org/jboss/
trunk/samples/esb/purchasing/system/src/org/
Modified:
trunk/pom.xml
trunk/runtime/jbossesb/pom.xml
Log:
[SOAG-13]
Restructure the codes
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-06-19 08:00:32 UTC (rev 36)
+++ trunk/pom.xml 2008-06-19 12:57:31 UTC (rev 37)
@@ -200,6 +200,19 @@
<id>jboss-snapshot</id>
<url>http://snapshots.jboss.org/maven2</url>
</repository>
+
+ <repository>
+ <id>maven.repo</id>
+ <name>maven repository</name>
+ <url>http://repo1.maven.org/maven2</url>
+ </repository>
+
+ <repository>
+ <id>ibiblio</id>
+ <name>ibiblio repository</name>
+ <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
+ </repository>
+
</repositories>
<distributionManagement>
<repository>
Modified: trunk/runtime/jbossesb/pom.xml
===================================================================
--- trunk/runtime/jbossesb/pom.xml 2008-06-19 08:00:32 UTC (rev 36)
+++ trunk/runtime/jbossesb/pom.xml 2008-06-19 12:57:31 UTC (rev 37)
@@ -17,15 +17,29 @@
<properties>
<hibernate-version>3.2.4.sp1</hibernate-version>
- <hibernate-annotations-version>3.2.1.GA</hibernate-annotations-version>
+ <hibernate-annotations-version>3.2.1.ga</hibernate-annotations-version>
<ejb3-persistence-version>1.0.1.GA</ejb3-persistence-version>
- <hibernate-commons-annotation>3.0.0.GA</hibernate-commons-annotation>
- <hibernate-tools-version>3.2.0.GA</hibernate-tools-version>
+ <hibernate-commons-annotations>3.0.0.ga</hibernate-commons-annotations>
+ <hibernate-tools-version>3.2.0.ga</hibernate-tools-version>
</properties>
- <dependencyManagement>
- <dependencies>
+ <dependencies>
<dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossesb</groupId>
+ <artifactId>rosetta</artifactId>
+ <version>4.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossesb</groupId>
+ <artifactId>config-model</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate-version}</version>
@@ -42,8 +56,8 @@
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-commons-annotation</artifactId>
- <version>${hibernate-commons-annotation}</version>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>${hibernate-commons-annotations}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -51,7 +65,7 @@
<version>${hibernate-tools-version}</version>
</dependency>
</dependencies>
- </dependencyManagement>
+
<reporting>
<plugins>
<plugin>
Copied: trunk/runtime/jbossesb/src/main/java/org (from rev 33, trunk/samples/esb/purchasing/system/src/org)
Copied: trunk/runtime/jbossesb/src/main/java/org/jboss (from rev 36, trunk/samples/esb/purchasing/system/src/org/jboss)
15 years, 10 months
Overlord SVN: r36 - in trunk/runtime/jbossesb: src and 2 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-19 04:00:32 -0400 (Thu, 19 Jun 2008)
New Revision: 36
Added:
trunk/runtime/jbossesb/src/
trunk/runtime/jbossesb/src/main/
trunk/runtime/jbossesb/src/main/java/
trunk/runtime/jbossesb/src/main/resources/
trunk/runtime/jbossesb/src/test/
trunk/runtime/jbossesb/src/test/java/
trunk/runtime/jbossesb/src/test/resources/
Modified:
trunk/runtime/jbossesb/pom.xml
Log:
[SOAG-13]
* Add directory
Modified: trunk/runtime/jbossesb/pom.xml
===================================================================
--- trunk/runtime/jbossesb/pom.xml 2008-06-19 07:53:09 UTC (rev 35)
+++ trunk/runtime/jbossesb/pom.xml 2008-06-19 08:00:32 UTC (rev 36)
@@ -5,7 +5,7 @@
<groupId>org.jboss.soa.overlord</groupId>
<artifactId>runtime-jbossesb</artifactId>
<version>1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <packaging>jar</packaging>
<name>JBoss Overlord - Runtime - JBossESB</name>
<url>http://www.jboss.org/overlord</url>
15 years, 10 months
Overlord SVN: r35 - in trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord: jbossesb and 1 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-06-19 03:53:09 -0400 (Thu, 19 Jun 2008)
New Revision: 35
Added:
trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/conversation/LogicalCourier.java
trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/
trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/MessageUtil.java
trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/NameSpaceUtil.java
trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/Test.java
trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/XMLUtils.java
Log:
[SOAG-7]
* Remove the dependencies from pi4soa common libraries.
Added: trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/conversation/LogicalCourier.java
===================================================================
--- trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/conversation/LogicalCourier.java (rev 0)
+++ trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/conversation/LogicalCourier.java 2008-06-19 07:53:09 UTC (rev 35)
@@ -0,0 +1,75 @@
+/*
+ * 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.soa.overlord.conversation;
+
+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.
+ */
+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: trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/MessageUtil.java
===================================================================
--- trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/MessageUtil.java (rev 0)
+++ trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/MessageUtil.java 2008-06-19 07:53:09 UTC (rev 35)
@@ -0,0 +1,94 @@
+/*
+ * 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.soa.overlord.jbossesb.util;
+
+import java.util.logging.Logger;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * This class represents utility functions for processing
+ * messages.
+ *
+ */
+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: trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/NameSpaceUtil.java
===================================================================
--- trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/NameSpaceUtil.java (rev 0)
+++ trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/NameSpaceUtil.java 2008-06-19 07:53:09 UTC (rev 35)
@@ -0,0 +1,137 @@
+/*
+ * 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.soa.overlord.jbossesb.util;
+
+/**
+ * This class provides helper functiions for manipulating fully
+ * qualified names (with local parts and namespaces).
+ */
+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: trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/Test.java
===================================================================
--- trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/Test.java (rev 0)
+++ trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/Test.java 2008-06-19 07:53:09 UTC (rev 35)
@@ -0,0 +1,45 @@
+/*
+ * 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.soa.overlord.jbossesb.util;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author jeffyu
+ *
+ */
+public class Test {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) throws Exception{
+ String attr="myId";
+ String val="<order><orderId id=\""+3+"\" /></order>";
+ String expr="/order/orderId/@id";
+
+ String value = XMLUtils.executeXpath(val, expr);
+ System.out.println(value);
+
+ Element element = (Element) XMLUtils.getNode(val);
+ System.out.println(XMLUtils.executeXpath(element, expr));
+ }
+
+}
Added: trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/XMLUtils.java
===================================================================
--- trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/XMLUtils.java (rev 0)
+++ trunk/samples/esb/purchasing/system/src/org/jboss/soa/overlord/jbossesb/util/XMLUtils.java 2008-06-19 07:53:09 UTC (rev 35)
@@ -0,0 +1,125 @@
+/*
+ * 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.soa.overlord.jbossesb.util;
+
+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;
+
+
+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
15 years, 10 months