[jboss-svn-commits] JBL Code SVN: r19968 - in labs/jbossesb/trunk/product: samples/trailblazer and 5 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri May 16 10:01:41 EDT 2008
Author: kevin.conner at jboss.com
Date: 2008-05-16 10:01:41 -0400 (Fri, 16 May 2008)
New Revision: 19968
Removed:
labs/jbossesb/trunk/product/samples/trailblazer/banks/test/
labs/jbossesb/trunk/product/samples/trailblazer/client/lib/
labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/c3p0-0.9.1-pre9.jar
labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/commons-logging.jar
labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/hsqldb.jar
labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/milyn-smooks-csv-0.1.jar
labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/opencsv-1.6.jar
labs/jbossesb/trunk/product/samples/trailblazer/esb/test/
Modified:
labs/jbossesb/trunk/product/build.xml
labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
labs/jbossesb/trunk/product/samples/trailblazer/build.xml
labs/jbossesb/trunk/product/samples/trailblazer/readme.txt
Log:
Fixed trailblazer to work in jbossesb-server: JBESB-1718
Modified: labs/jbossesb/trunk/product/build.xml
===================================================================
--- labs/jbossesb/trunk/product/build.xml 2008-05-16 13:58:52 UTC (rev 19967)
+++ labs/jbossesb/trunk/product/build.xml 2008-05-16 14:01:41 UTC (rev 19968)
@@ -371,6 +371,10 @@
<exclude name="**/*.odg"/>
</fileset>
</copy>
+ <copy todir="${org.jboss.esb.installationdirectory}/samples/trailblazer/esb/lib/ext">
+ <fileset dir="${org.jboss.esb.installationdirectory}/lib"
+ includes="test-util.jar"/>
+ </copy>
</target>
<target name="org.jboss.esb.dist" depends="org.jboss.esb.install, org.jboss.esb.javadocs">
Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml 2008-05-16 13:58:52 UTC (rev 19967)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml 2008-05-16 14:01:41 UTC (rev 19968)
@@ -1,29 +1,38 @@
<project name="BANKS" default="compile" basedir=".">
+ <property name="trailblazer.dir" location=".."/>
+ <property name="esb.home.dir" value="${trailblazer.dir}/../.."/>
+ <property name="install.dir" value="${esb.home.dir}/install"/>
+ <property file="${install.dir}/deployment.properties"/>
+ <property name="org.jboss.esb.server.home" location="${esb.home.dir}"/>
+ <property name="org.jboss.esb.server.config" value="default"/>
<property file="bank.properties"/>
+
<!-- Some default build locations -->
- <property name="org.jboss.esb.ext.lib.dir" value="../../../lib/ext"/>
+ <property name="server.dir" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+ <property name="server.lib.dir" location="${server.dir}/lib"/>
+ <property name="server.deploy.dir" location="${server.dir}/deploy"/>
+
<property name="org.jboss.esb.samples.loanbroker.banks.dest" value="${basedir}/build"/>
<property name="org.jboss.esb.samples.loanbroker.banks.classes.dir" value="${basedir}/build/classes/banks/"/>
- <property name="org.jboss.esb.samples.loanbroker.banks.testclasses.dir" value="${basedir}/build/classes/tests/"/>
<property name="org.jboss.esb.samples.loanbroker.banks.src.dir" value="${basedir}/src"/>
- <property name="org.jboss.esb.samples.loanbroker.banks.test.dir" value="${basedir}/test"/>
<property name="org.jboss.esb.samples.loanbroker.banks.jar.dest" value="${basedir}/build/dist/lib/"/>
<property name="org.jboss.esb.samples.loanbroker.banks.lib.ext.dir" value="${basedir}/lib/ext"/>
- <property name="org.jboss.esb.samples.loanbroker.banks.tests.report.dir" value="${basedir}/build/tests"/>
<path id="org.jboss.esb.samples.loanbroker.banks.classpath">
<fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
- <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
+ <fileset dir="${server.deploy.dir}/jbossesb.sar/lib/" includes="xstream*.jar"/>
+ <fileset dir="${server.deploy.dir}/jboss-aop-jdk50.deployer/" includes="jboss-aop-jdk50.jar trove.jar"/>
+ <fileset dir="${server.lib.dir}" includes="*.jar"/>
+ <fileset dir="${org.jboss.esb.server.home}/lib" includes="jboss-common.jar concurrent.jar"/>
</path>
- <path id="org.jboss.esb.samples.loanbroker.banks.testclasspath">
- <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
- <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
- <pathelement location="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"/>
- <pathelement location="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"/>
- <pathelement location="."/>
- </path>
+ <path id="org.jboss.esb.samples.loanbroker.banks.exec-classpath">
+ <path refid="org.jboss.esb.samples.loanbroker.banks.classpath"/>
+ <fileset dir="${org.jboss.esb.samples.loanbroker.banks.jar.dest}"
+ includes="*.jar"/>
+ </path>
+
<target name="clean">
<delete dir="${org.jboss.esb.samples.loanbroker.banks.dest}" />
</target>
@@ -34,8 +43,6 @@
<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}"/>
<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist"/>
<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/banks"/>
- <mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/tests"/>
- <mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/tests"/>
<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib"/>
</target>
@@ -50,13 +57,6 @@
>
<src path="${org.jboss.esb.samples.loanbroker.banks.src.dir}"/>
</javac>
- <javac
- destdir="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"
- debug="true"
- classpathref="org.jboss.esb.samples.loanbroker.banks.testclasspath"
- >
- <src path="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
- </javac>
</target>
<!-- javadocs paths -->
@@ -81,41 +81,18 @@
<arg value="${jms.provider.url}"/>
<arg value="${jms.queue.in}"/>
<arg value="${jms.queue.out}"/>
- <classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+ <classpath refid="org.jboss.esb.samples.loanbroker.banks.exec-classpath"/>
</java>
</target>
<target name="runFileBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
<echo>Running File Based Bank</echo>
<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerFlatFile" failonerror="true" args="${file.monitored.directory}">
- <classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+ <classpath refid="org.jboss.esb.samples.loanbroker.banks.exec-classpath"/>
</java>
</target>
<!-- Short target names -->
<target name="compile" depends="org.jboss.esb.samples.loanbroker.banks.compile"/>
- <target name="test" depends="org.jboss.esb.samples.loanbroker.banks.test"/>
<target name="jar" depends="org.jboss.esb.samples.loanbroker.banks.jar"/>
-
- <!-- ====================================================================== -->
- <!-- U N I T T E S T S -->
- <!-- ====================================================================== -->
- <target name="org.jboss.esb.samples.loanbroker.banks.test" depends="org.jboss.esb.samples.loanbroker.banks.compile">
- <echo message="Running tests for banks"/>
- <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
- <formatter type="plain" usefile="false"/>
- <formatter type="xml"/>
- <batchtest todir="${org.jboss.esb.samples.loanbroker.banks.tests.report.dir}">
- <fileset dir="${org.jboss.esb.samples.loanbroker.banks.test.dir}">
- <include name="**/**Test.java"/>
- </fileset>
- </batchtest>
- <classpath>
- <!-- Need the tests src folder because there may be non-compiled test resources -->
- <pathelement location="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
- <path refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
- </classpath>
- </junit>
- </target>
-
</project>
Modified: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java 2008-05-16 13:58:52 UTC (rev 19967)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java 2008-05-16 14:01:41 UTC (rev 19968)
@@ -262,6 +262,11 @@
logger.error(ex.getMessage(), ex) ;
}
+ synchronized(managerJMS) {
+ try {
+ managerJMS.wait();
+ } catch (final InterruptedException ie) {} // ignore
+ }
}
private BankQuoteRequest getQuoteFromCSV(String csv) {
Modified: labs/jbossesb/trunk/product/samples/trailblazer/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/build.xml 2008-05-16 13:58:52 UTC (rev 19967)
+++ labs/jbossesb/trunk/product/samples/trailblazer/build.xml 2008-05-16 14:01:41 UTC (rev 19968)
@@ -1,21 +1,17 @@
<project name="TRAILBLAZER" default="war" basedir=".">
- <!-- UPDATE THIS WITH YOUR JBOSS_HOME AND SERVER -->
<property name="trailblazer.dir" location="."/>
<property name="esb.home.dir" value="${trailblazer.dir}/../.."/>
<property name="install.dir" value="${esb.home.dir}/install"/>
<property file="${install.dir}/deployment.properties"/>
+ <property name="org.jboss.esb.server.home" location="${esb.home.dir}"/>
+ <property name="org.jboss.esb.server.config" value="default"/>
- <property name="trailblazer.dir" value="."/>
-
<!-- properties for the esb part of the trailblazer -->
<property name="esb.dest" value="${basedir}/esb/build"/>
<property name="classes.dir" value="${basedir}/esb/build/classes"/>
- <property name="esb.testclasses.dir" value="${basedir}/esb/build/classes/tests/"/>
<property name="esb.src.dir" value="${basedir}/esb/src"/>
- <property name="esb.test.dir" value="${basedir}/esb/test"/>
<property name="esb.lib.dir" value="${basedir}/esb/lib"/>
- <property name="report.dir" value="${basedir}/esb/build/tests"/>
<!-- properties for the client(web) part of the trailblazer -->
<property name="client.dir" value="${basedir}/client"/>
@@ -23,16 +19,10 @@
value="${basedir}/client/build"/>
<property name="esb.samples.trailblazer.client.classes.dir"
value="${basedir}/client/build/classes"/>
- <property name="esb.samples.trailblazer.client.testclasses.dir"
- value="${basedir}/client/build/classes/tests/"/>
<property name="esb.samples.trailblazer.client.src.dir"
value="${basedir}/client/src"/>
- <property name="esb.samples.trailblazer.client.test.dir"
- value="${basedir}/client/test"/>
<property name="esb.samples.trailblazer.client.lib.dir"
value="${basedir}/client/lib"/>
- <property name="esb.samples.trailblazer.client.tests.report.dir"
- value="${basedir}/client/build/tests"/>
<property environment="env" />
@@ -89,6 +79,7 @@
<fileset dir="${esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
<fileset dir="${test.util.dir}" includes="test-util.jar"/>
<fileset dir="${log4j.lib.dir}" includes="log4j.jar"/>
+ <fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib" includes="hsqldb.jar"/>
</path>
<!-- classpath for running the listener-->
@@ -246,7 +237,7 @@
<target name="deploy" depends="jar, war">
<property name="target-server" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}" />
- <echo message="Deploying Trailblazer EAR and WAR files to target server '${target-server}'."/>
+ <echo message="Deploying Trailblazer ESB and WAR files to target server '${target-server}'."/>
<copy todir="${target-server}/deploy">
<fileset dir="${esb.dest}/dist/" includes="trailblazer.esb" />
<fileset dir="${esb.samples.trailblazer.client.dest}/dist/" includes="trailblazer.war" />
Deleted: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/c3p0-0.9.1-pre9.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/commons-logging.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/hsqldb.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/milyn-smooks-csv-0.1.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/opencsv-1.6.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/trunk/product/samples/trailblazer/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/readme.txt 2008-05-16 13:58:52 UTC (rev 19967)
+++ labs/jbossesb/trunk/product/samples/trailblazer/readme.txt 2008-05-16 14:01:41 UTC (rev 19968)
@@ -1,31 +1,36 @@
-The trailblazer is a small application that uses several of the services provided by the JBoss ESB.
+The trailblazer is a small application that uses several of the services
+provided by the JBoss ESB.
-
Required to run the Trailblazer:
- ANT
- A mail server to send email notifications
-- JBoss AS 4.0.4 or higher with EJB3 and JBossWS support. You can install the latest JBoss AS JEMS installer and select the "EJB3" install config to get the right one installed.
-- JBoss AS 4.0.4 or higher with the JBoss ESB SAR deployment (jbossesb.sar).
+- The standalone JBoss ESB or JBoss Application Server 4.2.0.
+N.B. If you are running in the application server then you must follow the
+instructions for installing the ESB into the application server.
+
Settings required to edit before running:
File: jbossesb-properties.xml (jbossesb.sar/jbossesb-properties.xml)
-- Update the section titled "transports" and specify all of the SMTP mail server settings for your environment.
+- This file resides under the deploy directory of the standalone JBoss ESB or
+ application server. You must modify the smtp properties within the
+ "transports" section so that they specity the correct SMTP configuration for
+ your environment.
-File : deployment.properties (install/deployment.properties)
-- Update the app server location settings.
-
-------------------------------------------
To run the Trailblazer, follow these steps:
-1 - run your JBoss AS - you will need to have the 4.0.4 or higher with the EJB3 support installed. This is required because the TB uses the JSR-181 pojo style web service.
+1 - run your JBoss AS or standalone JBoss ESB
-2 - from the TB_ROOT, execute the command to start the ESB: "ant deploy"
-* this should deploy the ESB and WAR files to your JBoss AS server/default.
+2 - from the TB_ROOT, execute the command to start the ESB:
+ "ant deploy"
+* this should deploy the ESB and WAR files
-3 - from the TB_ROOT/banks execute the command to start the Bank service: "ant runJMSBank"
+3 - from the TB_ROOT/banks execute the command to start the Bank service:
+ "ant runJMSBank"
-4 - from the jsp: localhost:8080/trailblazer
+4 - from a browser: http://localhost:8080/trailblazer
-That's it. Now you can submit quotes, and you should receive an email at the specified address on the page.
+That's it. Now you can submit quotes, and you should receive an email at the
+specified address on the page.
More information about the jboss-svn-commits
mailing list