JBoss JBPM SVN: r5448 - in jbpm4/trunk: modules/distro/src/main/files/install and 9 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-07 17:25:41 -0400 (Fri, 07 Aug 2009)
New Revision: 5448
Added:
jbpm4/trunk/modules/distro/src/main/files/install/src/user-webapp/
jbpm4/trunk/qa/jbpm.test.webapp/
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.cfg.xml
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.hibernate.cfg.xml
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.properties
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.templates.examples.xml
jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/web.xml
Removed:
jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/
jbpm4/trunk/qa/jbpm.cfg/
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
jbpm4/trunk/pom.xml
jbpm4/trunk/qa/build.xml
jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat
Log:
JBPM-2409 JBPM-2411 added hudson integration test script for tomcat
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -42,19 +42,19 @@
<!-- ### CREATE CONFIGURATION ########################################### -->
<target name="create.cfg" description="Creates a configuration in dir generated/cfg">
- <delete dir="generated/cfg" />
- <mkdir dir="generated/cfg" />
- <copy tofile="generated/cfg/jbpm.cfg.xml"
- file="src/cfg/jbpm/${tx}.jbpm.cfg.xml" />
- <copy tofile="generated/cfg/jbpm.hibernate.cfg.xml"
- file="src/cfg/hibernate/${hibernate.connection.type}/${database}.hibernate.cfg.xml">
- <filterset filtersfile="src/jdbc/${database}.properties" />
+ <delete dir="${jbpm.home}/install/generated/cfg" />
+ <mkdir dir="${jbpm.home}/install/generated/cfg" />
+ <copy tofile="${jbpm.home}/install/generated/cfg/jbpm.cfg.xml"
+ file="${jbpm.home}/install/src/cfg/jbpm/${tx}.jbpm.cfg.xml" />
+ <copy tofile="${jbpm.home}/install/generated/cfg/jbpm.hibernate.cfg.xml"
+ file="${jbpm.home}/install/src/cfg/hibernate/${hibernate.connection.type}/${database}.hibernate.cfg.xml">
+ <filterset filtersfile="${jbpm.home}/install/src/jdbc/${database}.properties" />
</copy>
- <copy todir="generated/cfg">
- <fileset dir="src/cfg/logging/${logging}" />
+ <copy todir="${jbpm.home}/install/generated/cfg">
+ <fileset dir="${jbpm.home}/install/src/cfg/logging/${logging}" />
</copy>
- <copy tofile="generated/cfg/jbpm.mail.properties"
- file="src/cfg/mail/jbpm.mail.properties">
+ <copy tofile="${jbpm.home}/install/generated/cfg/jbpm.mail.properties"
+ file="${jbpm.home}/install/src/cfg/mail/jbpm.mail.properties">
<filterset>
<filter token="mail.smtp.host" value="${mail.smtp.host}" />
</filterset>
@@ -65,18 +65,18 @@
<target name="create.user.webapp"
depends="create.cfg"
description="Generates a configuration in dir generated/cfg">
- <delete dir="generated/user.webapp" />
- <mkdir dir="generated/user.webapp/WEB-INF/classes" />
- <mkdir dir="generated/user.webapp/WEB-INF/lib" />
- <copy todir="generated/user.webapp">
- <fileset dir="src/user.webapp"/>
+ <delete dir="${jbpm.home}/install/generated/user-webapp" />
+ <mkdir dir="${jbpm.home}/install/generated/user-webapp/WEB-INF/classes" />
+ <mkdir dir="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
+ <copy todir="${jbpm.home}/install/generated/user-webapp">
+ <fileset dir="${jbpm.home}/install/src/user-webapp"/>
</copy>
- <copy todir="generated/user.webapp/WEB-INF/classes">
- <fileset dir="generated/cfg">
+ <copy todir="${jbpm.home}/install/generated/user-webapp/WEB-INF/classes">
+ <fileset dir="${jbpm.home}/install/generated/cfg">
<exclude name="logging.properties" />
</fileset>
</copy>
- <copy todir="generated/user.webapp/WEB-INF/lib">
+ <copy todir="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib">
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
</fileset>
@@ -95,16 +95,11 @@
<include name="mail.jar" />
<include name="slf4j-api.jar" />
<include name="slf4j-jdk14.jar" />
- <include name="gwt-console-server-integration.jar" />
- <include name="gwt-console-rpc.jar" />
- <include name="jbpm-console-integration.jar" />
- <include name="jbpm-console-form-plugin.jar" />
- <include name="jbpm-console-graphView-plugin.jar"/>
</fileset>
</copy>
<!-- copy database driver -->
- <property name="database.driver.destination.dir" value="generated/user.webapp/WEB-INF/lib" />
+ <property name="database.driver.destination.dir" value="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
<property name="is.tomcat" value="true" />
<antcall target="internal.copy.database.driver" />
</target>
@@ -367,11 +362,15 @@
<!-- ### STOP TOMCAT ################################################### -->
<target name="stop.tomcat"
description="Signals Tomcat to stop, but doesn't wait till its finished">
- <exec executable="${jboss.home}/bin/shutdown.bat" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="-S"/>
+ <exec executable="${tomcat.home}/bin/catalina.bat"
+ dir="${tomcat.home}/bin"
+ os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="stop"/>
</exec>
- <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux, Unix, Mac">
- <arg line="-S"/>
+ <exec executable="${tomcat.home}/bin/catalina.sh"
+ dir="${tomcat.home}/bin"
+ os="Linux, Unix, Mac">
+ <arg line="stop"/>
</exec>
</target>
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/user-webapp (from rev 5447, jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp)
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java 2009-08-07 21:25:41 UTC (rev 5448)
@@ -32,11 +32,11 @@
public class Launcher extends Thread {
Task task;
- String command;
+ String[] command;
String endMsg;
File dir;
- public Launcher(Task task, String command, String endMsg, String dir) {
+ public Launcher(Task task, String[] command, String endMsg, String dir) {
this.task = task;
this.command = command;
this.endMsg = endMsg;
@@ -58,7 +58,7 @@
task.log(line);
}
- task.log("'" + command + "' started.");
+ task.log("'" + command[0] + "' started.");
} catch (IOException e) {
throw new BuildException("couldn't start '" + command + "'", e);
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2009-08-07 21:25:41 UTC (rev 5448)
@@ -38,15 +38,20 @@
String os = getProject().getProperty( "os.name" ).toLowerCase();
// build the command string
- String command = null;
+ String[] command = null;
if ( os.indexOf( "windows" ) != -1 ) {
- command = getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.bat " + getConfigParameter();
+ command = new String[]{getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.bat"};
} else if ( os.indexOf( "linux" ) != -1 || os.indexOf( "mac" ) != -1) {
- command = getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.sh " + getConfigParameter();
+ command = new String[]{getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.sh"};
} else {
throw new BuildException( "os '" + os + "' not supported in the startjboss task." );
}
+
+ if (configuration!=null) {
+ command = new String[]{command[0], "-c "+configuration};
+ }
+
// launch the command and wait till the END_MESSAGE appears
Thread launcher = new Launcher(this, command, END_MESSAGE, null);
launcher.start();
@@ -68,11 +73,6 @@
throw new BuildException("startjboss couldn't figure out which jboss to start: attribute jbosshome not specified and property jboss.home was not set");
}
- String getConfigParameter() {
- if (configuration==null) return "";
- return "-c "+configuration;
- }
-
public void setConfiguration(String configuration) {
this.configuration = configuration;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java 2009-08-07 21:25:41 UTC (rev 5448)
@@ -42,11 +42,11 @@
String os = getProject().getProperty( "os.name" ).toLowerCase();
// build the command string
- String command = null;
+ String[] command = null;
if ( os.indexOf( "windows" ) != -1 ) {
- command = getTomcatHome() + fileSeparator + "bin" + fileSeparator + "catalina.bat run";
+ command = new String[] {getTomcatHome() + fileSeparator + "bin" + fileSeparator + "catalina.bat", "run"};
} else if ( os.indexOf( "linux" ) != -1 || os.indexOf( "mac" ) != -1) {
- command = getTomcatHome() + fileSeparator + "bin" + fileSeparator + "catalina.sh run";
+ command = new String[] {getTomcatHome() + fileSeparator + "bin" + fileSeparator + "catalina.sh", "run"};
} else {
throw new BuildException( "os '" + os + "' not supported in the start-tomcat task." );
}
Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -64,7 +64,7 @@
<goal>copy</goal>
</goals>
<configuration>
- <outputDirectory>target/warlibs</outputDirectory>
+ <outputDirectory>target/jbpm.test.webapp.libs</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>aspectj</groupId>
@@ -103,9 +103,17 @@
<classifier>tests</classifier>
</artifactItem>
<artifactItem>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-console-reports</artifactId>
+ </artifactItem>
+ <artifactItem>
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp-wiser</artifactId>
</artifactItem>
+ <artifactItem>
+ <groupId>org.subethamail</groupId>
+ <artifactId>subethasmtp-smtp</artifactId>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -173,7 +181,7 @@
<echo message="${test_classpath}" />
<java classname="org.jbpm.cactustool.CactusTestGenerator">
<classpath path="${test_classpath}"/>
- <arg line="src/test/java ../examples/src/test/java" />
+ <arg line="src/test/java ../examples/src/test/java ../test-db/src/test/java" />
</java>
</tasks>
</configuration>
Modified: jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java 2009-08-07 21:25:41 UTC (rev 5448)
@@ -44,6 +44,72 @@
suite.addTestSuite(org.jbpm.examples.timer.event.TimerEventTest.class);
suite.addTestSuite(org.jbpm.examples.timer.repeat.TimerRepeatTest.class);
suite.addTestSuite(org.jbpm.examples.timer.transition.TimerTransitionTest.class);
+ suite.addTestSuite(org.jbpm.examples.async.eventlistener.AsyncEventListenerTest.class);
+ suite.addTestSuite(org.jbpm.examples.goup.concurrency.GroupConcurrencyTest.class);
+ suite.addTestSuite(org.jbpm.examples.goup.multipleentries.MultipleEntriesTest.class);
+ suite.addTestSuite(org.jbpm.examples.goup.simple.GroupSimpleTest.class);
+ suite.addTestSuite(org.jbpm.examples.goup.timer.GroupTimerTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.DecisionTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.ForkJoinInSameTransactionTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.ForkTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.ForkToTaskTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.GroupBasicsTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.GroupTimersTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.JoinTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.StatesJoinEndTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.StateTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.SubProcessTest.class);
+ suite.addTestSuite(org.jbpm.test.activities.TasksJoinEndTest.class);
+ suite.addTestSuite(org.jbpm.test.async.AsyncBasicsTest.class);
+ suite.addTestSuite(org.jbpm.test.async.AsyncEndCombinationTest.class);
+ suite.addTestSuite(org.jbpm.test.async.AsyncEventListenerOnEndTest.class);
+ suite.addTestSuite(org.jbpm.test.auth.UserProvidedAuthenticationTest.class);
+ suite.addTestSuite(org.jbpm.test.cfg.ConfigurationTest.class);
+ suite.addTestSuite(org.jbpm.test.deploy.DeploymentQueryTest.class);
+ suite.addTestSuite(org.jbpm.test.deploy.ImageTest.class);
+ suite.addTestSuite(org.jbpm.test.deploy.SuspendDeploymentTest.class);
+ suite.addTestSuite(org.jbpm.test.eventlistener.EventListenerTest.class);
+ suite.addTestSuite(org.jbpm.test.eventlistener.HqlEventListenerTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.ConcurrentEndTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.ExecutionEagerLoadingTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.ExecutionQueryTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.FindExecutionTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.SignalExecutionTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.StartExecutionTest.class);
+ suite.addTestSuite(org.jbpm.test.execution.SystemVariablesTest.class);
+ suite.addTestSuite(org.jbpm.test.history.AvgDurationTest.class);
+ suite.addTestSuite(org.jbpm.test.history.ChoiceDistributionTest.class);
+ suite.addTestSuite(org.jbpm.test.history.EndProcessInstanceTest.class);
+ suite.addTestSuite(org.jbpm.test.history.HistoryActivityInstanceQeuryTest.class);
+ suite.addTestSuite(org.jbpm.test.history.HistoryDetailQueryTest.class);
+ suite.addTestSuite(org.jbpm.test.history.HistoryTaskAssigneeTest.class);
+ suite.addTestSuite(org.jbpm.test.history.ProcessInstanceHistoryTest.class);
+ suite.addTestSuite(org.jbpm.test.identity.IdentityTest.class);
+ suite.addTestSuite(org.jbpm.test.mgmt.JobQueryTest.class);
+ suite.addTestSuite(org.jbpm.test.process.ActivityCoordinatesTest.class);
+ suite.addTestSuite(org.jbpm.test.process.DeploymentResourcesTest.class);
+ suite.addTestSuite(org.jbpm.test.process.DescriptionTest.class);
+ suite.addTestSuite(org.jbpm.test.process.ProcessDefinitionQueryTest.class);
+ suite.addTestSuite(org.jbpm.test.process.ProcessDefinitionStartFormTest.class);
+ suite.addTestSuite(org.jbpm.test.process.RepositoryServiceTest.class);
+ suite.addTestSuite(org.jbpm.test.reporting.SQLStmtTest.class);
+ suite.addTestSuite(org.jbpm.test.task.SubTaskTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskCommentsTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskCreateUpdateDeleteTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskListTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskParticipationsTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskPropertiesTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskQueryCandidatesTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskQueryProcessTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskQueryTest.class);
+ suite.addTestSuite(org.jbpm.test.task.TaskVariablesTest.class);
+ suite.addTestSuite(org.jbpm.test.taskactivity.TaskCandidatesTest.class);
+ suite.addTestSuite(org.jbpm.test.taskactivity.TaskCompletionTest.class);
+ suite.addTestSuite(org.jbpm.test.taskactivity.TaskOutcomesTest.class);
+ suite.addTestSuite(org.jbpm.test.taskactivity.TaskReassignTest.class);
+ suite.addTestSuite(org.jbpm.test.timer.TimerTest.class);
+ suite.addTestSuite(org.jbpm.test.variables.BasicVariablesTest.class);
+ suite.addTestSuite(org.jbpm.test.variables.VariableBasicTypesTest.class);
return suite;
}
}
Modified: jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties 2009-08-07 21:25:41 UTC (rev 5448)
@@ -1 +1 @@
-cactus.contextURL=http://localhost:8080/jbpm-test-cactus
+cactus.contextURL=http://localhost:8080/jbpm-test-webapp
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/pom.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -347,11 +347,16 @@
<version>${spring.version}</version>
</dependency>
<dependency>
- <groupId>org.subethamail</groupId>
- <artifactId>subethasmtp-wiser</artifactId>
- <version>${wiser.version}</version>
+ <groupId>org.subethamail</groupId>
+ <artifactId>subethasmtp-wiser</artifactId>
+ <version>${wiser.version}</version>
</dependency>
<dependency>
+ <groupId>org.subethamail</groupId>
+ <artifactId>subethasmtp-smtp</artifactId>
+ <version>${wiser.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-lgpl</artifactId>
<version>${woodstox.version}</version>
Modified: jbpm4/trunk/qa/build.xml
===================================================================
--- jbpm4/trunk/qa/build.xml 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/qa/build.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -19,11 +19,14 @@
<property name="jboss.server.configuration" value="default" />
<property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
+ <property name="tomcat.version" value="6.0.20" />
+ <property name="tomcat.parent.dir" value="${jbpm.home}" />
+ <property name="tomcat.home" value="${tomcat.parent.dir}/apache-tomcat-${tomcat.version}" />
+
<!-- DERIVED PROPERTIES -->
<property name="jbpm.filename" value="jbpm-distro-${jbpm.version}.zip" />
<property name="jbpm.distro.dir" value="../modules/distro/target" />
<property name="jbpm.distro.path" value="${jbpm.distro.dir}/jbpm-${jbpm.version}.zip" />
- <property name="jbpm.home" value="${workspace}/jbpm-${jbpm.version}" />
<condition property="jbpm.identity.idm">
<equals arg1="${identity.component}" arg2="jboss.idm"/>
@@ -35,58 +38,55 @@
<echo message="jbpm.distro.path.. ${jbpm.distro.path}" />
- <!-- DELETE JBPM INSTALLATION -->
- <target name="delete.jbpm.installation"
- description="deletes ${jbpm.home}">
- <delete dir="${jbpm.home}" />
- </target>
-
- <!-- INSTALL JBPM -->
- <target name="install.jbpm"
- description="unzips the jbpm distro file in the ${jbpm.parent.dir}">
- <unzip src="${jbpm.distro.path}" dest="${jbpm.parent.dir}" />
- </target>
-
<!-- REINSTALL JBPM -->
<target name="reinstall.jbpm"
- depends="delete.jbpm.installation, install.jbpm"
- description="deletes the jbpm installation and then reinstalls jbpm"/>
+ description="deletes the jbpm installation and then reinstalls jbpm">
+ <delete dir="${jbpm.home}" />
+ <unzip src="${jbpm.distro.path}" dest="${jbpm.parent.dir}" />
+ </target>
- <!-- REINSTALL TOMCAT AND JBPM -->
- <target name="reinstall.tomcat.and.jbpm">
- <ant antfile="${jbpm.home}/install/build.xml" target="reinstall.tomcat.and.jbpm" />
- </target>
+ <!-- TOMCAT INTEGRATION TESTSUITE SETUP -->
+ <target name="tomcat.integration.testsuite.setup"
+ depends="reinstall.jbpm">
+ <ant antfile="${jbpm.home}/install/build.xml" target="reinstall.tomcat" />
+ <ant antfile="${jbpm.home}/install/build.xml" target="create.user.webapp" />
- <!-- CUSTOMIZE TOMCAT FOR INTEGRATION TESTSUITE -->
- <target name="customize.tomcat.for.integration.testsuite">
- <!-- add the examples.jar to the tomcat libs dir -->
+ <!-- to build the jbpm test webapp we start by copying the user webapp -->
+ <echo message="sldjkflskdfj" />
+ <mkdir dir="${tomcat.home}/webapps/jbpm-test-webapp" />
+ <copy todir="${tomcat.home}/webapps/jbpm-test-webapp">
+ <fileset dir="${jbpm.home}/install/generated/user-webapp"/>
+ </copy>
+
+ <!-- customize the configuration for the jbpm-test-webapp -->
+ <copy todir="${tomcat.home}/webapps/jbpm-test-webapp" overwrite="true">
+ <fileset dir="jbpm.test.webapp" />
+ </copy>
+
+ <!-- add examples.jar -->
<ant antfile="${jbpm.home}/examples/build.xml" target="examples.jar" />
- <copy file="${jbpm.home}/examples/target/examples.jar" todir="${tomcat.home}/lib" />
+ <copy file="${jbpm.home}/examples/target/examples.jar" todir="${tomcat.home}/webapps/jbpm-test-webapp/WEB-INF/lib" />
- <!-- add the junit.jar to the tomcat libs dir -->
- <copy file="${jbpm.home}/lib/junit.jar" todir="${tomcat.home}/lib" />
-
- <!-- customize the jbpm configuration for the testsuite -->
- <jar destfile="${tomcat.home}/lib/jbpm.cfg.jar">
- <fileset dir="jbpm.cfg/tomcat" />
- </jar>
+ <!-- add junit.jar -->
+ <copy file="${jbpm.home}/lib/junit.jar" todir="${tomcat.home}/webapps/jbpm-test-webapp/WEB-INF/lib" />
- <!-- copy the cactus war file -->
- <war destfile="${tomcat.home}/webapps/jbpm-test-cactus.war">
- <fileset dir="modules/test-cactus/src/main/webapp" />
- <classes dir="modules/test-cactus/target/test-classes" />
- <lib dir="modules/test-cactus/target/lib">
- </lib>
- </war>
+ <!-- add the cactus libs -->
+ <copy todir="${tomcat.home}/webapps/jbpm-test-webapp/WEB-INF/lib">
+ <fileset dir="../modules/test-cactus/target/jbpm.test.webapp.libs" />
+ </copy>
+
+ <!-- start tomcat -->
+ <ant antfile="${jbpm.home}/install/build.xml" target="start.tomcat" />
</target>
- <!-- START TOMCAT -->
- <target name="start.tomcat">
- <ant antfile="${jbpm.home}/install/build.xml" target="start.tomcat" />
- </target>
+ <!-- TOMCAT INTEGRATION TESTSUITE TEARDOWN -->
+ <target name="tomcat.integration.testsuite.teardown">
+ <!-- stop tomcat -->
+ <ant antfile="${jbpm.home}/install/build.xml" target="stop.tomcat" />
+ </target>
+
-
- <target name="integration.testrun.setup"
+ <target name="integration.testrun.setup"
depends="reinstall.jbpm, post.install"
description="reinstalls jbpm, reinstalls jboss, installs jbpm into jboss, starts jboss and then creates the jbpm schema">
<ant antfile="${jbpm.home}/jboss/build.xml" target="reinstall.jboss" />
Modified: jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat 2009-08-07 15:56:43 UTC (rev 5447)
+++ jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat 2009-08-07 21:25:41 UTC (rev 5448)
@@ -1,15 +1,12 @@
set MAVEN_OPTS=-Xms1024M -Xmx1024M
cmd /C mvn -U -Pdistro,integration clean install
-cmd /C ant -f qa/build.xml reinstall.jbpm
-cmd /C ant -f qa/build.xml reinstall.tomcat.and.jbpm
-cmd /C ant -f qa/build.xml customize.tomcat.for.integration.testsuite
-cmd /C ant -f qa/build.xml start.tomcat
+cmd /C ant -f qa/build.xml tomcat.integration.testsuite.setup
cd modules\test-cactus
cmd /C mvn -Pruntest test
cd ..\..
-cmd /C ant -f qa/build.xml stop.tomcat
+cmd /C ant -f qa/build.xml tomcat.integration.testsuite.teardown
echo
Copied: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.cfg.xml (from rev 5447, jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.cfg.xml)
===================================================================
--- jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.cfg.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <import resource="jbpm.default.cfg.xml" />
+ <import resource="jbpm.tx.hibernate.cfg.xml" />
+ <import resource="jbpm.jpdl.cfg.xml" />
+ <import resource="jbpm.identity.cfg.xml" />
+ <import resource="jbpm.businesscalendar.cfg.xml" />
+ <!-- import resource="jbpm.jobexecutor.cfg.xml" / -->
+
+ <import resource="jbpm.mail.templates.examples.xml" />
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.hibernate.cfg.xml (from rev 5447, jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.hibernate.cfg.xml)
===================================================================
--- jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.hibernate.cfg.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <property name="hibernate.hbm2ddl.auto">create-drop</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.properties (from rev 5447, jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.properties)
===================================================================
--- jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.properties (rev 0)
+++ jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.properties 2009-08-07 21:25:41 UTC (rev 5448)
@@ -0,0 +1,3 @@
+mail.smtp.host localhost
+mail.smtp.port 2525
+mail.from noreply(a)jbpm.org
\ No newline at end of file
Property changes on: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.templates.examples.xml (from rev 5447, jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.templates.examples.xml)
===================================================================
--- jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.templates.examples.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.templates.examples.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <process-engine-context>
+
+ <mail-template name="rectify-template">
+ <to addresses="${addressee}" />
+ <cc users="bb" groups="innerparty" />
+ <bcc groups="thinkpol" />
+ <subject>rectify ${newspaper}</subject>
+ <text>${newspaper} ${date} ${details}</text>
+ </mail-template>
+
+ </process-engine-context>
+
+</jbpm-configuration>
\ No newline at end of file
Property changes on: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/classes/jbpm.mail.templates.examples.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/web.xml
===================================================================
--- jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/web.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/web.xml 2009-08-07 21:25:41 UTC (rev 5448)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
+
+<web-app>
+
+ <servlet>
+ <servlet-name>ServletRedirector</servlet-name>
+ <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletRedirector</servlet-name>
+ <url-pattern>/ServletRedirector</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Property changes on: jbpm4/trunk/qa/jbpm.test.webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss JBPM SVN: r5447 - jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-07 11:56:43 -0400 (Fri, 07 Aug 2009)
New Revision: 5447
Modified:
jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml
Log:
JBPM-2409 JBPM-2411 work to get tomcat in the ci
Modified: jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml 2009-08-07 15:55:27 UTC (rev 5446)
+++ jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml 2009-08-07 15:56:43 UTC (rev 5447)
@@ -6,14 +6,4 @@
<web-app>
- <servlet>
- <servlet-name>ServletRedirector</servlet-name>
- <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ServletRedirector</servlet-name>
- <url-pattern>/ServletRedirector</url-pattern>
- </servlet-mapping>
-
</web-app>
14 years, 9 months
JBoss JBPM SVN: r5446 - in jbpm4/trunk: modules/distro/src/main/files/install/src and 7 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-07 11:55:27 -0400 (Fri, 07 Aug 2009)
New Revision: 5446
Added:
jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/
jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/images/
jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/images/jbpm.png
jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/index.html
jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat
jbpm4/trunk/qa/jbpm.cfg/
jbpm4/trunk/qa/jbpm.cfg/tomcat/
jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.cfg.xml
jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.hibernate.cfg.xml
jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.properties
jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.templates.examples.xml
jbpm4/trunk/qa/jbpm.cfg/tomcat/logging.properties
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/qa/build.xml
Log:
JBPM-2409 JBPM-2411 work to get tomcat in the ci
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-07 13:39:29 UTC (rev 5445)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-07 15:55:27 UTC (rev 5446)
@@ -22,7 +22,7 @@
<property name="logging" value="jdk" /> <!-- jdk | provided -->
<property name="tomcat.version" value="6.0.20" />
- <property name="tomcat.parent.dir" value="generated" />
+ <property name="tomcat.parent.dir" value="${jbpm.home}" />
<property name="tomcat.home" value="${tomcat.parent.dir}/apache-tomcat-${tomcat.version}" />
<property name="tomcat.filename" value="apache-tomcat-${tomcat.version}.zip" />
<property name="tomcat.distro.dir" value="downloads" />
@@ -30,18 +30,18 @@
<property name="tomcat.distro.path" value="${tomcat.distro.dir}/${tomcat.filename}" />
<property name="jboss.version" value="5.1.0.GA" />
- <property name="jboss.parent.dir" value="generated" />
+ <property name="jboss.parent.dir" value="${jbpm.home}" />
<property name="jboss.home" value="${jboss.parent.dir}/jboss-${jboss.version}" />
<property name="jboss.filename" value="jboss-${jboss.version}.zip" />
- <property name="jboss.distro.dir" value="downloads" />
- <property name="jboss.distro.url" value="http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-5.1.0.GA/${jbo..."/>
+ <property name="jboss.distro.dir" value="downloads" />
+ <property name="jboss.distro.url" value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
<property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
<property name="jboss.server.configuration" value="default" />
<property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
<property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
<!-- ### CREATE CONFIGURATION ########################################### -->
- <target name="generate.cfg" description="Generates a configuration in dir generated/cfg">
+ <target name="create.cfg" description="Creates a configuration in dir generated/cfg">
<delete dir="generated/cfg" />
<mkdir dir="generated/cfg" />
<copy tofile="generated/cfg/jbpm.cfg.xml"
@@ -61,6 +61,54 @@
</copy>
</target>
+ <!-- ### CREATE USER WEBAPP ########################################## -->
+ <target name="create.user.webapp"
+ depends="create.cfg"
+ description="Generates a configuration in dir generated/cfg">
+ <delete dir="generated/user.webapp" />
+ <mkdir dir="generated/user.webapp/WEB-INF/classes" />
+ <mkdir dir="generated/user.webapp/WEB-INF/lib" />
+ <copy todir="generated/user.webapp">
+ <fileset dir="src/user.webapp"/>
+ </copy>
+ <copy todir="generated/user.webapp/WEB-INF/classes">
+ <fileset dir="generated/cfg">
+ <exclude name="logging.properties" />
+ </fileset>
+ </copy>
+ <copy todir="generated/user.webapp/WEB-INF/lib">
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar" />
+ </fileset>
+ <fileset dir="${jbpm.home}/lib">
+ <include name="activation.jar" />
+ <include name="antlr.jar" />
+ <include name="commons-collections.jar" />
+ <include name="dom4j.jar" />
+ <include name="freemarker.jar" />
+ <include name="hibernate-core.jar" />
+ <include name="hibernate-cglib-repack.jar" />
+ <include name="javassist.jar" />
+ <include name="jta.jar" />
+ <include name="juel*.jar" />
+ <include name="livetribe-jsr223.jar" />
+ <include name="mail.jar" />
+ <include name="slf4j-api.jar" />
+ <include name="slf4j-jdk14.jar" />
+ <include name="gwt-console-server-integration.jar" />
+ <include name="gwt-console-rpc.jar" />
+ <include name="jbpm-console-integration.jar" />
+ <include name="jbpm-console-form-plugin.jar" />
+ <include name="jbpm-console-graphView-plugin.jar"/>
+ </fileset>
+ </copy>
+
+ <!-- copy database driver -->
+ <property name="database.driver.destination.dir" value="generated/user.webapp/WEB-INF/lib" />
+ <property name="is.tomcat" value="true" />
+ <antcall target="internal.copy.database.driver" />
+ </target>
+
<!-- ### REINSTALL JBOSS ################################################ -->
<target name="reinstall.jboss"
depends="delete.jboss, install.jboss"
@@ -246,7 +294,7 @@
<!-- ### INSTALL JBPM INTO TOMCAT ####################################### -->
<target name="install.jbpm.into.tomcat"
- depends="generate.cfg"
+ depends="create.cfg"
description="Installs jBPM into tomcat">
<!-- create the jbpm configuration jar file -->
@@ -261,16 +309,25 @@
<include name="jbpm.jar" />
</fileset>
<fileset dir="${jbpm.home}/lib">
- <include name="gwt-console-server-integration.jar" />
+ <include name="activation.jar" />
+ <include name="antlr.jar" />
+ <include name="commons-collections.jar" />
+ <include name="dom4j.jar" />
+ <include name="freemarker.jar" />
+ <include name="hibernate-core.jar" />
+ <include name="hibernate-cglib-repack.jar" />
+ <include name="javassist.jar" />
+ <include name="jta.jar" />
+ <include name="juel*.jar" />
+ <include name="livetribe-jsr223.jar" />
+ <include name="mail.jar" />
+ <include name="slf4j-api.jar" />
+ <include name="slf4j-jdk14.jar" />
+ <include name="gwt-console-server-integration.jar" />
<include name="gwt-console-rpc.jar" />
<include name="jbpm-console-integration.jar" />
<include name="jbpm-console-form-plugin.jar" />
<include name="jbpm-console-graphView-plugin.jar"/>
- <include name="freemarker.jar" />
- <include name="livetribe-jsr223.jar" />
- <include name="juel*.jar" />
- <include name="hibernate-core.jar" />
- <include name="hibernate-cglib-repack.jar" />
</fileset>
</copy>
@@ -282,13 +339,14 @@
</copy>
<!-- reporting -->
- <property name="birt.dir" value="${jboss.server.data.dir}/birt"/>
+ <property name="birt.dir" value="${tomcat.home}/birt"/>
<mkdir dir="${birt.dir}"/>
<unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
<unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
<!-- copy database driver -->
- <property name="container.lib.dir" value="${tomcat.home}/" />
+ <property name="driver.destination.dir" value="${tomcat.home}/" />
+ <property name="is.tomcat" value="true" />
<antcall target="internal.copy.database.driver" />
</target>
@@ -324,13 +382,26 @@
</condition>
<condition property="database.driver" value="ojdbc14.jar">
<equals arg1="${database}" arg2="oracle" />
- </condition>
+ </condition>
+ <condition property="database.driver" value="mysql-connector-java.jar">
+ <equals arg1="${database}" arg2="mysql" />
+ </condition>
<condition property="database.driver" value="postgresql.jar">
<equals arg1="${database}" arg2="postgresql" />
</condition>
+ <condition property="database.driver" value="hsqldb.jar">
+ <and>
+ <equals arg1="${database}" arg2="hsqldb" />
+ <equals arg1="${is.tomcat}" arg2="true" />
+ </and>
+ </condition>
+ <antcall target="internal.copy.database.driver.if.needed" />
+ </target>
+
+ <target name="internal.copy.database.driver.if.needed" if="database.driver">
<available file="${jbpm.home}/lib/${database.driver}" property="database.driver.jar.available" />
<fail message="please download the ${database} driver jar and put it in the ${jbpm.home}/lib directory" unless="database.driver.jar.available" />
- <copy file="${jbpm.home}/lib/${database.driver}" todir="${container.lib.dir}" />
- </target>
+ <copy file="${jbpm.home}/lib/${database.driver}" todir="${database.driver.destination.dir}" />
+ </target>
</project>
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/images/jbpm.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/images/jbpm.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/index.html
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/index.html (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/index.html 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,11 @@
+<!doctype html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;">
+ <title>jBPM User Webapp</title>
+ </head>
+ <body>
+ <img src="images/jbpm.png" />
+ <span style="font-family:verdana;"> User Webapp</span>
+ </body>
+</html>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/user.webapp/index.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java 2009-08-07 13:39:29 UTC (rev 5445)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/Launcher.java 2009-08-07 15:55:27 UTC (rev 5446)
@@ -22,6 +22,7 @@
package org.jbpm.pvm.internal.ant;
import java.io.BufferedReader;
+import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -33,27 +34,33 @@
Task task;
String command;
String endMsg;
+ File dir;
- public Launcher(Task task, String command, String endMsg) {
+ public Launcher(Task task, String command, String endMsg, String dir) {
this.task = task;
this.command = command;
this.endMsg = endMsg;
+ this.dir = (dir!=null ? new File(dir) : null);
}
public void run() {
try {
task.log("starting '" + command + "'...");
- Process process = Runtime.getRuntime().exec(command);
+ Process process = new ProcessBuilder(command)
+ .redirectErrorStream(true)
+ .directory(dir)
+ .start();
+
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = "";
while (line.indexOf(endMsg) == -1) {
line = reader.readLine();
task.log(line);
}
+
task.log("'" + command + "' started.");
} catch (IOException e) {
throw new BuildException("couldn't start '" + command + "'", e);
}
}
-
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2009-08-07 13:39:29 UTC (rev 5445)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2009-08-07 15:55:27 UTC (rev 5446)
@@ -48,7 +48,7 @@
}
// launch the command and wait till the END_MESSAGE appears
- Thread launcher = new Launcher(this, command, END_MESSAGE);
+ Thread launcher = new Launcher(this, command, END_MESSAGE, null);
launcher.start();
launcher.join();
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java 2009-08-07 13:39:29 UTC (rev 5445)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartTomcatTask.java 2009-08-07 15:55:27 UTC (rev 5446)
@@ -44,15 +44,15 @@
// build the command string
String command = null;
if ( os.indexOf( "windows" ) != -1 ) {
- command = getTomcatHome() + fileSeparator + "bin" + fileSeparator + "startup.bat";
+ command = getTomcatHome() + fileSeparator + "bin" + fileSeparator + "catalina.bat run";
} else if ( os.indexOf( "linux" ) != -1 || os.indexOf( "mac" ) != -1) {
- command = getTomcatHome() + fileSeparator + "bin" + fileSeparator + "startup.sh";
+ command = getTomcatHome() + fileSeparator + "bin" + fileSeparator + "catalina.sh run";
} else {
- throw new BuildException( "os '" + os + "' not supported in the starttomcat task." );
+ throw new BuildException( "os '" + os + "' not supported in the start-tomcat task." );
}
// launch the command and wait till the END_MESSAGE appears
- Thread launcher = new Launcher(this, command, END_MESSAGE);
+ Thread launcher = new Launcher(this, command, END_MESSAGE, getTomcatHome()+fileSeparator+"bin");
launcher.start();
launcher.join();
@@ -69,7 +69,7 @@
if (tomcatHomeSysProp!=null) {
return tomcatHomeSysProp;
}
- throw new BuildException("starttomcat couldn't figure out which tomcat to start: attribute tomcathome not specified and property tomcat.home was not set");
+ throw new BuildException("start-tomcat couldn't figure out which tomcat to start: attribute tomcathome not specified and property tomcat.home was not set");
}
public void setTomcathome(String tomcathome) {
Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml 2009-08-07 13:39:29 UTC (rev 5445)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2009-08-07 15:55:27 UTC (rev 5446)
@@ -15,10 +15,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>jBPM 4 - Cactus</name>
+ <name>jBPM 4 - Test Cactus</name>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-test-cactus</artifactId>
- <packaging>war</packaging>
+ <packaging>jar</packaging>
<!-- Parent -->
<parent>
@@ -28,112 +28,95 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <!-- Dependencies -->
<dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
- <exclusions>
- <exclusion>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.subethamail</groupId>
- <artifactId>subethasmtp-wiser</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-test-db</artifactId>
- <classifier>tests</classifier>
- <exclusions>
- <exclusion>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.subethamail</groupId>
- <artifactId>subethasmtp-wiser</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.core</artifactId>
- <version>1.8.1</version>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.integration.shared.api</artifactId>
- <version>1.8.1</version>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.integration.ant</artifactId>
- <version>1.8.1</version>
- </dependency>
- <dependency>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>1.5.3</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>runtime</scope>
- </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-db</artifactId>
+ <classifier>tests</classifier>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </dependency>
</dependencies>
- <!-- Plugins -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-cactus-test-suite</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <echo message="${test_classpath}" />
- <java classname="org.jbpm.cactustool.CactusTestGenerator">
- <classpath path="${test_classpath}"/>
- <arg line="src/test/java ../examples/src/test/java" />
- </java>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>org/jbpm/test/AllIntegrationTests.java</include>
- </includes>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
<profiles>
<profile>
+ <id>integration</id>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy.libs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/warlibs</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </artifactItem>
+ <artifactItem>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </artifactItem>
+ <artifactItem>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.ant</artifactId>
+ </artifactItem>
+ <artifactItem>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ </artifactItem>
+ <artifactItem>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-db</artifactId>
+ <classifier>tests</classifier>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.subethamail</groupId>
+ <artifactId>subethasmtp-wiser</artifactId>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+
+ <profile>
<id>runtest</id>
<dependencies>
<dependency>
@@ -151,7 +134,62 @@
<artifactId>jbpm-test-db</artifactId>
<classifier>tests</classifier>
</dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-cactus-test-suite</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="test_classpath" refid="maven.test.classpath"/>
+ <echo message="${test_classpath}" />
+ <java classname="org.jbpm.cactustool.CactusTestGenerator">
+ <classpath path="${test_classpath}"/>
+ <arg line="src/test/java ../examples/src/test/java" />
+ </java>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/jbpm/test/AllIntegrationTests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
Modified: jbpm4/trunk/qa/build.xml
===================================================================
--- jbpm4/trunk/qa/build.xml 2009-08-07 13:39:29 UTC (rev 5445)
+++ jbpm4/trunk/qa/build.xml 2009-08-07 15:55:27 UTC (rev 5446)
@@ -25,39 +25,69 @@
<property name="jbpm.distro.path" value="${jbpm.distro.dir}/jbpm-${jbpm.version}.zip" />
<property name="jbpm.home" value="${workspace}/jbpm-${jbpm.version}" />
- <property name="jbossidm.version" value="1.0.0.Beta1" />
- <property name="jbossidm.home" value="${jbpm.parent.dir}/jbossidm-${jbossidm.version}" />
-
- <!-- ### LOG PROPERTIES ################################################# -->
- <target name="log.properties">
- <echo message="database.......... ${database}" />
- <echo message="jbpm.version...... ${jbpm.version}" />
- <echo message="jbpm.home......... ${jbpm.home}" />
- <echo message="jbpm.distro.path.. ${jbpm.distro.path}" />
- <echo message="jbossidm.home .... ${jbossidm.home}" />
- </target>
-
<condition property="jbpm.identity.idm">
<equals arg1="${identity.component}" arg2="jboss.idm"/>
</condition>
- <!-- TARGETS -->
+ <echo message="database.......... ${database}" />
+ <echo message="jbpm.version...... ${jbpm.version}" />
+ <echo message="jbpm.home......... ${jbpm.home}" />
+ <echo message="jbpm.distro.path.. ${jbpm.distro.path}" />
+
+
+ <!-- DELETE JBPM INSTALLATION -->
<target name="delete.jbpm.installation"
description="deletes ${jbpm.home}">
<delete dir="${jbpm.home}" />
</target>
+ <!-- INSTALL JBPM -->
<target name="install.jbpm"
description="unzips the jbpm distro file in the ${jbpm.parent.dir}">
<unzip src="${jbpm.distro.path}" dest="${jbpm.parent.dir}" />
</target>
+ <!-- REINSTALL JBPM -->
<target name="reinstall.jbpm"
depends="delete.jbpm.installation, install.jbpm"
description="deletes the jbpm installation and then reinstalls jbpm"/>
+ <!-- REINSTALL TOMCAT AND JBPM -->
+ <target name="reinstall.tomcat.and.jbpm">
+ <ant antfile="${jbpm.home}/install/build.xml" target="reinstall.tomcat.and.jbpm" />
+ </target>
+
+ <!-- CUSTOMIZE TOMCAT FOR INTEGRATION TESTSUITE -->
+ <target name="customize.tomcat.for.integration.testsuite">
+ <!-- add the examples.jar to the tomcat libs dir -->
+ <ant antfile="${jbpm.home}/examples/build.xml" target="examples.jar" />
+ <copy file="${jbpm.home}/examples/target/examples.jar" todir="${tomcat.home}/lib" />
+
+ <!-- add the junit.jar to the tomcat libs dir -->
+ <copy file="${jbpm.home}/lib/junit.jar" todir="${tomcat.home}/lib" />
+
+ <!-- customize the jbpm configuration for the testsuite -->
+ <jar destfile="${tomcat.home}/lib/jbpm.cfg.jar">
+ <fileset dir="jbpm.cfg/tomcat" />
+ </jar>
+
+ <!-- copy the cactus war file -->
+ <war destfile="${tomcat.home}/webapps/jbpm-test-cactus.war">
+ <fileset dir="modules/test-cactus/src/main/webapp" />
+ <classes dir="modules/test-cactus/target/test-classes" />
+ <lib dir="modules/test-cactus/target/lib">
+ </lib>
+ </war>
+ </target>
+
+ <!-- START TOMCAT -->
+ <target name="start.tomcat">
+ <ant antfile="${jbpm.home}/install/build.xml" target="start.tomcat" />
+ </target>
+
+
<target name="integration.testrun.setup"
- depends="log.properties, reinstall.jbpm, post.install"
+ depends="reinstall.jbpm, post.install"
description="reinstalls jbpm, reinstalls jboss, installs jbpm into jboss, starts jboss and then creates the jbpm schema">
<ant antfile="${jbpm.home}/jboss/build.xml" target="reinstall.jboss" />
Added: jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat (rev 0)
+++ jbpm4/trunk/qa/hudson-jbpm4-tomcat.bat 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,15 @@
+set MAVEN_OPTS=-Xms1024M -Xmx1024M
+
+cmd /C mvn -U -Pdistro,integration clean install
+cmd /C ant -f qa/build.xml reinstall.jbpm
+cmd /C ant -f qa/build.xml reinstall.tomcat.and.jbpm
+cmd /C ant -f qa/build.xml customize.tomcat.for.integration.testsuite
+cmd /C ant -f qa/build.xml start.tomcat
+
+cd modules\test-cactus
+cmd /C mvn -Pruntest test
+cd ..\..
+
+cmd /C ant -f qa/build.xml stop.tomcat
+
+echo
Added: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.cfg.xml 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <import resource="jbpm.default.cfg.xml" />
+ <import resource="jbpm.tx.hibernate.cfg.xml" />
+ <import resource="jbpm.jpdl.cfg.xml" />
+ <import resource="jbpm.identity.cfg.xml" />
+ <import resource="jbpm.businesscalendar.cfg.xml" />
+ <!-- import resource="jbpm.jobexecutor.cfg.xml" / -->
+
+ <import resource="jbpm.mail.templates.examples.xml" />
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.hibernate.cfg.xml 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <property name="hibernate.hbm2ddl.auto">create-drop</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.properties
===================================================================
--- jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.properties (rev 0)
+++ jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.properties 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,3 @@
+mail.smtp.host localhost
+mail.smtp.port 2525
+mail.from noreply(a)jbpm.org
\ No newline at end of file
Property changes on: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.templates.examples.xml
===================================================================
--- jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.templates.examples.xml (rev 0)
+++ jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.templates.examples.xml 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <process-engine-context>
+
+ <mail-template name="rectify-template">
+ <to addresses="${addressee}" />
+ <cc users="bb" groups="innerparty" />
+ <bcc groups="thinkpol" />
+ <subject>rectify ${newspaper}</subject>
+ <text>${newspaper} ${date} ${details}</text>
+ </mail-template>
+
+ </process-engine-context>
+
+</jbpm-configuration>
\ No newline at end of file
Property changes on: jbpm4/trunk/qa/jbpm.cfg/tomcat/jbpm.mail.templates.examples.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/qa/jbpm.cfg/tomcat/logging.properties
===================================================================
--- jbpm4/trunk/qa/jbpm.cfg/tomcat/logging.properties (rev 0)
+++ jbpm4/trunk/qa/jbpm.cfg/tomcat/logging.properties 2009-08-07 15:55:27 UTC (rev 5446)
@@ -0,0 +1,18 @@
+handlers= java.util.logging.ConsoleHandler
+redirect.commons.logging = enabled
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
+
+org.jbpm.level=FINE
+# org.jbpm.pvm.internal.tx.level=FINE
+# org.jbpm.pvm.internal.wire.level=FINE
+# org.jbpm.pvm.internal.util.level=FINE
+
+org.hibernate.level=INFO
+org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.cfg.HbmBinder.level=SEVERE
+# org.hibernate.SQL.level=FINEST
+# org.hibernate.type.level=FINEST
+# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Property changes on: jbpm4/trunk/qa/jbpm.cfg/tomcat/logging.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss JBPM SVN: r5445 - in jbpm4/trunk: modules/distro and 1 other directory.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-08-07 09:39:29 -0400 (Fri, 07 Aug 2009)
New Revision: 5445
Modified:
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/pom.xml
Log:
Update to console 1.1.2-SNAPSHOT and reference gwt-console-server.war by classfier 'jbpm'
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-08-07 13:38:25 UTC (rev 5444)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-08-07 13:39:29 UTC (rev 5445)
@@ -113,11 +113,13 @@
<dependency>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console</artifactId>
+ <classifier>jbpm</classifier>
<type>war</type>
</dependency>
<dependency>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-server</artifactId>
+ <classifier>jbpm</classifier>
<type>war</type>
</dependency>
<dependency>
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-08-07 13:38:25 UTC (rev 5444)
+++ jbpm4/trunk/pom.xml 2009-08-07 13:39:29 UTC (rev 5445)
@@ -49,7 +49,7 @@
<cactus.version>1.8.1</cactus.version>
<aspectjrt.version>1.5.3</aspectjrt.version>
<freemarker.version>2.3.15</freemarker.version>
- <gwt.console.version>1.0.1-SNAPSHOT</gwt.console.version>
+ <gwt.console.version>1.1.2-SNAPSHOT</gwt.console.version>
<jbpm.gpd.version>4.1-SNAPSHOT</jbpm.gpd.version>
<hibernate.version>3.3.1.GA</hibernate.version>
<slf4j.version>1.5.2</slf4j.version>
@@ -177,13 +177,15 @@
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console</artifactId>
<version>${gwt.console.version}</version>
- <type>war</type>
+ <classifier>jbpm</classifier>
+ <type>war</type>
</dependency>
<dependency>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-server</artifactId>
<version>${gwt.console.version}</version>
- <type>war</type>
+ <classifier>jbpm</classifier>
+ <type>war</type>
</dependency>
<dependency>
<groupId>org.jboss.bpm</groupId>
14 years, 9 months
JBoss JBPM SVN: r5444 - jbpm4/trunk/modules/distro/src/main/files/install.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-08-07 09:38:25 -0400 (Fri, 07 Aug 2009)
New Revision: 5444
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
Log:
Fix distro/build.xml
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-07 12:07:39 UTC (rev 5443)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-07 13:38:25 UTC (rev 5444)
@@ -29,12 +29,12 @@
<property name="tomcat.distro.url" value="http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomca..." />
<property name="tomcat.distro.path" value="${tomcat.distro.dir}/${tomcat.filename}" />
- <property name="jboss.version" value="5.1.0" />
+ <property name="jboss.version" value="5.1.0.GA" />
<property name="jboss.parent.dir" value="generated" />
<property name="jboss.home" value="${jboss.parent.dir}/jboss-${jboss.version}" />
<property name="jboss.filename" value="jboss-${jboss.version}.zip" />
- <property name="jboss.distro.dir" value="downloads" />
- <property name="jboss.distro.url" value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
+ <property name="jboss.distro.dir" value="downloads" />
+ <property name="jboss.distro.url" value="http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-5.1.0.GA/${jbo..."/>
<property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
<property name="jboss.server.configuration" value="default" />
<property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
@@ -130,8 +130,8 @@
<copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
<fileset dir="${jbpm.home}/lib">
- <include name="gwt-console.war" />
- <include name="gwt-console-server.war" />
+ <include name="gwt-console-jbpm.war" />
+ <include name="gwt-console-server-jbpm.war" />
</fileset>
</copy>
@@ -181,7 +181,7 @@
</copy>
<property name="container.lib.dir" value="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" />
- <antcall target="internal.copy.database.driver}" />
+ <antcall target="internal.copy.database.driver" />
</target>
<!-- ### START JBOSS ################################################### -->
@@ -318,16 +318,13 @@
</target>
<!-- ### COPY DATABASE DRIVER ######################################### -->
- <target name="internal.copy.database.driver" if="database.driver">
+ <target name="internal.copy.database.driver">
<condition property="database.driver" value="mysql-connector-java.jar">
<equals arg1="${database}" arg2="mysql" />
</condition>
<condition property="database.driver" value="ojdbc14.jar">
<equals arg1="${database}" arg2="oracle" />
- </condition>
- <condition property="database.driver" value="mysql-connector-java.jar">
- <equals arg1="${database}" arg2="mysql" />
- </condition>
+ </condition>
<condition property="database.driver" value="postgresql.jar">
<equals arg1="${database}" arg2="postgresql" />
</condition>
14 years, 9 months
JBoss JBPM SVN: r5443 - in jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources: org/jbpm/context/exe/variableinstance and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-08-07 08:07:39 -0400 (Fri, 07 Aug 2009)
New Revision: 5443
Added:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/hibernate.mapping.mysql.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/HibernateStringInstance.mysql.hbm.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/db/hibernate.types.mysql.hbm.xml
Log:
[JBPM-2369] restore text columns in mysql
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/hibernate.mapping.mysql.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/hibernate.mapping.mysql.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/hibernate.mapping.mysql.xml 2009-08-07 12:07:39 UTC (rev 5443)
@@ -0,0 +1,142 @@
+ <!-- ###################### -->
+ <!-- # jbpm mapping files # -->
+ <!-- ###################### -->
+
+ <!-- hql queries -->
+ <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
+
+ <!-- MySQL type mappings -->
+ <mapping resource="org/jbpm/db/hibernate.types.mysql.hbm.xml" />
+
+ <!-- hql queries used in simulation for querying historical data.
+ uncomment if you want to use the GetSimulationInputCommand
+ or you want to use the queries directly.
+ beware: the queries need the stddev function to be enabled in your dialect.
+ for more information, visit:
+ http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.... -->
+ <!--
+ <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
+ -->
+
+ <!-- graph.action mapping files -->
+ <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
+
+ <!-- graph.def mapping files -->
+ <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
+ <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
+
+ <!-- ########################################### -->
+ <!-- # mapping file with external dependencies # -->
+ <!-- ########################################### -->
+ <!-- the following mapping file has a dependency on 'bsh-{version}.jar'.
+ uncomment this if bsh is not in your classpath.
+ the script element will not be available in process definition files.
+ note: this mapping must appear below org/jbpm/graph/def/Action.hbm.xml -->
+ <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
+
+ <!-- graph.node mapping files -->
+ <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
+
+ <!-- context.def mapping files -->
+ <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
+
+ <!-- bytes mapping files -->
+ <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
+
+ <!-- module.def mapping files -->
+ <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
+
+ <!-- file.def mapping files -->
+ <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
+
+ <!-- taskmgmt.def mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+
+ <!-- scheduler.def mapping files -->
+ <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
+ <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
+
+ <!-- graph.exe mapping files -->
+ <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
+
+ <!-- module.exe mapping files -->
+ <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
+
+ <!-- context.exe mapping files -->
+ <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.mysql.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
+
+ <!-- job mapping files -->
+ <mapping resource="org/jbpm/job/Job.hbm.xml"/>
+ <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
+ <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
+ <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
+ <mapping resource="org/jbpm/job/CleanUpProcessJob.hbm.xml"/>
+
+ <!-- taskmgmt.exe mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
+
+ <!-- logging mapping files -->
+ <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/HibernateStringInstance.mysql.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/HibernateStringInstance.mysql.hbm.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/context/exe/variableinstance/HibernateStringInstance.mysql.hbm.xml 2009-08-07 12:07:39 UTC (rev 5443)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping auto-import="false" default-access="field">
+ <subclass name="org.jbpm.context.exe.variableinstance.HibernateStringInstance"
+ extends="org.jbpm.context.exe.VariableInstance"
+ discriminator-value="I">
+ <any name="value" id-type="text" cascade="save-update">
+ <column name="STRINGIDCLASS_" />
+ <column name="STRINGVALUE_" length="4000"/>
+ </any>
+ </subclass>
+</hibernate-mapping>
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/db/hibernate.types.mysql.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/db/hibernate.types.mysql.hbm.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/db/hibernate.types.mysql.hbm.xml 2009-08-07 12:07:39 UTC (rev 5443)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+ <typedef name="longstring" class="org.hibernate.type.TextType" />
+</hibernate-mapping>
\ No newline at end of file
14 years, 9 months
JBoss JBPM SVN: r5442 - in jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm: module/def and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-08-07 07:31:09 -0400 (Fri, 07 Aug 2009)
New Revision: 5442
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/module/def/ModuleDefinition.hbm.xml
Log:
[JBPM-2369] restore type and length of ModuleDefinition.name and Delegation.className
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml 2009-08-07 08:54:13 UTC (rev 5441)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/instantiation/Delegation.hbm.xml 2009-08-07 11:31:09 UTC (rev 5442)
@@ -8,7 +8,7 @@
table="JBPM_DELEGATION">
<id name="id" column="ID_"><generator class="native" /></id>
- <property name="className" column="CLASSNAME_" />
+ <property name="className" column="CLASSNAME_" type="longstring" length="4000" />
<property name="configuration" column="CONFIGURATION_" type="longstring" length="4000" />
<property name="configType" column="CONFIGTYPE_"/>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/module/def/ModuleDefinition.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/module/def/ModuleDefinition.hbm.xml 2009-08-07 08:54:13 UTC (rev 5441)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/org/jbpm/module/def/ModuleDefinition.hbm.xml 2009-08-07 11:31:09 UTC (rev 5442)
@@ -19,7 +19,7 @@
<!-- I : org.jbpm.scheduler.def.SchedulerDefinition -->
<!-- T : org.jbpm.taskmgmt.def.TaskMgmtDefinition -->
- <property name="name" column="NAME_"/>
+ <property name="name" column="NAME_" type="longstring" length="4000"/>
<many-to-one name="processDefinition"
column="PROCESSDEFINITION_"
foreign-key="FK_MODDEF_PROCDEF"
14 years, 9 months
JBoss JBPM SVN: r5441 - in jbpm3/branches/jbpm-3.2-soa/modules: core/src/main/java/org/jbpm/persistence/db and 5 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-08-07 04:54:13 -0400 (Fri, 07 Aug 2009)
New Revision: 5441
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageService.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactoryImpl.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceImpl.java
jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/enterprise.xml
Log:
[JBPM-2472] Make JMS session creation configurable
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -31,38 +31,34 @@
import org.jbpm.msg.MessageService;
public class DbMessageService implements MessageService {
-
+
private static final long serialVersionUID = 1L;
- JobSession jobSession = null;
- JobExecutor jobExecutor = null;
- boolean hasProducedJobs = false;
-
+ final JobSession jobSession;
+ final JobExecutor jobExecutor;
+ boolean hasProducedJobs;
+
public DbMessageService() {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
- if (jbpmContext==null) {
- throw new JbpmException("instantiation of the DbMessageService requires a current JbpmContext");
- }
+ if (jbpmContext == null) throw new JbpmException("no active jbpm context");
+
jobSession = jbpmContext.getJobSession();
jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
}
public void send(Job job) {
jobSession.saveJob(job);
- log.debug("saved "+job);
hasProducedJobs = true;
}
public void close() {
- if ( (hasProducedJobs)
- && (jobExecutor!=null)
- ) {
- log.debug("messages were produced, job executor will be signalled");
- synchronized(jobExecutor) {
+ if (hasProducedJobs && jobExecutor != null) {
+ log.debug("messages were produced, job executor will be notified");
+ synchronized (jobExecutor) {
jobExecutor.notify();
}
}
}
-
+
private static Log log = LogFactory.getLog(DbMessageService.class);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -58,7 +58,7 @@
protected boolean mustConnectionBeClosed;
protected Transaction transaction;
- protected boolean isTransactionEnabled = true;
+ protected boolean isTransactionEnabled;
protected boolean isCurrentSessionEnabled;
protected Session session;
@@ -156,10 +156,11 @@
public Connection getConnection(boolean resolveSession) {
if (connection == null) {
- if (persistenceServiceFactory.getDataSource() != null) {
+ DataSource dataSource = persistenceServiceFactory.getDataSource();
+ if (dataSource != null) {
try {
- log.debug("establishing connneciton to data source");
- connection = persistenceServiceFactory.getDataSource().getConnection();
+ log.debug("establishing connection to data source");
+ connection = dataSource.getConnection();
mustConnectionBeClosed = true;
}
catch (SQLException e) {
@@ -257,7 +258,7 @@
session.flush();
}
catch (HibernateException e) {
- // avoid log and throw antipatternf
+ // avoid log and throw antipattern
return e;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -30,14 +30,13 @@
import org.jbpm.svc.Service;
/**
- * The JTA persistence service enables jBPM to participate in JTA transactions.
- * If an existing transaction is underway, {@link JtaDbPersistenceService}
- * clings to it; otherwise it starts a new transaction.
+ * The JTA persistence service enables jBPM to participate in JTA transactions. If an existing
+ * transaction is underway, {@link JtaDbPersistenceService} clings to it; otherwise it starts a new
+ * transaction.
*
* <h3>Configuration</h3>
*
- * The JTA persistence service factory has the configurable fields described
- * below.
+ * The JTA persistence service factory has the configurable fields described below.
*
* <ul>
* <li><code>isCurrentSessionEnabled</code></li>
@@ -47,46 +46,44 @@
* Refer to the jBPM manual for details.
*
* @author Tom Baeyens
+ * @author Alejandro Guizar
*/
-public class JtaDbPersistenceServiceFactory extends DbPersistenceServiceFactory
-{
+public class JtaDbPersistenceServiceFactory extends DbPersistenceServiceFactory {
private static final long serialVersionUID = 1L;
private UserTransaction userTransaction;
- public JtaDbPersistenceServiceFactory()
- {
+ public JtaDbPersistenceServiceFactory() {
setCurrentSessionEnabled(true);
setTransactionEnabled(false);
}
- public Service openService()
- {
+ public Service openService() {
return new JtaDbPersistenceService(this);
}
- public UserTransaction getUserTransaction()
- {
- if (userTransaction == null)
- {
+ public UserTransaction getUserTransaction() {
+ if (userTransaction == null) {
String jndiName = getConfiguration().getProperty("jta.UserTransaction");
- if (jndiName == null)
- {
+ if (jndiName == null) {
/*
- * EJB 2.1 section 20.9 The container must make the UserTransaction interface available to the enterprise beans that are allowed to use this interface (only
- * session and message- driven beans with bean-managed transaction demarcation are allowed to use this interface) in JNDI under the name
- * java:comp/UserTransaction. J2EE 1.4 section 4.2.1.1 The J2EE platform must provide an object implementing the UserTransaction interface to all web
- * components. The platform must publish the UserTransaction object in JNDI under the name java:comp/UserTransaction.
+ * EJB 2.1 section 20.9 The container must make the UserTransaction interface available to
+ * the enterprise beans that are allowed to use this interface (only session and message-
+ * driven beans with bean-managed transaction demarcation are allowed to use this interface)
+ * in JNDI under the name java:comp/UserTransaction.
*/
+ /*
+ * J2EE 1.4 section 4.2.1.1 The J2EE platform must provide an object implementing the
+ * UserTransaction interface to all web components. The platform must publish the
+ * UserTransaction object in JNDI under the name java:comp/UserTransaction.
+ */
jndiName = "java:comp/UserTransaction";
}
- try
- {
- userTransaction = (UserTransaction)new InitialContext().lookup(jndiName);
+ try {
+ userTransaction = (UserTransaction) new InitialContext().lookup(jndiName);
}
- catch (NamingException e)
- {
+ catch (NamingException e) {
throw new JbpmException("could not retrieve user transaction with name " + jndiName, e);
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/db/DbSchedulerService.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -37,20 +37,19 @@
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory.getLog(DbSchedulerService.class);
-
- JobSession jobSession = null;
- JobExecutor jobExecutor = null;
- boolean hasProducedJobs = false;
+ final JobSession jobSession;
+ final JobExecutor jobExecutor;
+ boolean hasProducedJobs;
+
public DbSchedulerService() {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
- if (jbpmContext==null) {
- throw new JbpmException("instantiation of the DbSchedulerService requires a current JbpmContext");
- }
+ if (jbpmContext == null) throw new JbpmException("no active jbpm context");
+
this.jobSession = jbpmContext.getJobSession();
this.jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
}
-
+
public void createTimer(Timer timerJob) {
jobSession.saveJob(timerJob);
hasProducedJobs = true;
@@ -70,7 +69,7 @@
public void close() {
if (hasProducedJobs && jobExecutor != null) {
- log.debug("timers were produced, job executor will be signalled");
+ log.debug("timers were produced, job executor will be notified");
synchronized (jobExecutor) {
jobExecutor.notify();
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -46,18 +46,19 @@
import org.jbpm.ejb.LocalCommandServiceHome;
/**
- * This message-driven bean listens for {@link ObjectMessage object messages}
- * containing a command instance. The received commands are
- * executed by the {@link CommandServiceBean command service} bean, using the
- * local interface.
+ * This message-driven bean listens for {@link ObjectMessage object messages} containing a command
+ * instance. The received commands are executed by the {@link CommandServiceBean command service}
+ * bean, using the local interface.
*
- * The body of the message must be a Java object that implements the {@link
- * Command} interface. The message properties, if any, are ignored.
+ * The body of the message must be a Java object that implements the {@link Command} interface. The
+ * message properties, if any, are ignored.
*
* <h3>Environment</h3>
*
- * <p>The environment entries and resources available for customization are
- * summarized in the table below.</p>
+ * <p>
+ * The environment entries and resources available for customization are summarized in the table
+ * below.
+ * </p>
*
* <table border="1">
* <tr>
@@ -68,50 +69,41 @@
* <tr>
* <td><code>ejb/LocalCommandServiceBean</code></td>
* <td>EJB Reference</td>
- * <td>Link to the local {@linkplain CommandServiceBean session bean} that
- * executes commands on a separate jBPM context.
- * </td>
+ * <td>Link to the local {@linkplain CommandServiceBean session bean} that executes commands on a
+ * separate jBPM context.</td>
* </tr>
* <tr>
* <td><code>jms/JbpmConnectionFactory</code></td>
* <td>Resource Manager Reference</td>
- * <td>Logical name of the factory that provides JMS connections for producing
- * result messages. Required for command messages that indicate a reply
- * destination.
- * </td>
+ * <td>Logical name of the factory that provides JMS connections for producing result messages.
+ * Required for command messages that indicate a reply destination.</td>
* </tr>
* <tr>
* <td><code>jms/DeadLetterQueue</code></td>
* <td>Message Destination Reference</td>
- * <td>Messages which do not contain a command are sent to the queue referenced
- * here. Optional; if absent, such messages are rejected, which may cause the
- * container to redeliver.
- * </td>
+ * <td>Messages which do not contain a command are sent to the queue referenced here. Optional; if
+ * absent, such messages are rejected, which may cause the container to redeliver.</td>
* </tr>
* </table>
*
* @author Jim Rigsbee
- * @author Tom Baeyens
* @author Alejandro Guizar
+ * @author Tom Baeyens
*/
-public class CommandListenerBean implements MessageDrivenBean, MessageListener
-{
+public class CommandListenerBean implements MessageDrivenBean, MessageListener {
private static final long serialVersionUID = 1L;
- MessageDrivenContext messageDrivenContext = null;
+ MessageDrivenContext messageDrivenContext;
LocalCommandService commandService;
Connection jmsConnection;
Destination deadLetterQueue;
- public void onMessage(Message message)
- {
- try
- {
+ public void onMessage(Message message) {
+ try {
// extract command from message
Command command = extractCommand(message);
- if (command == null)
- {
+ if (command == null) {
discard(message);
return;
}
@@ -119,54 +111,42 @@
Object result = commandService.execute(command);
// send a response back if a "reply to" destination is set
Destination replyTo = message.getJMSReplyTo();
- if (replyTo != null && (result instanceof Serializable || result == null))
- {
- sendResult((Serializable)result, replyTo, message.getJMSMessageID());
+ if (replyTo != null && (result instanceof Serializable || result == null)) {
+ sendResult((Serializable) result, replyTo, message.getJMSMessageID());
}
}
- catch (JMSException e)
- {
+ catch (JMSException e) {
messageDrivenContext.setRollbackOnly();
log.error("could not process message " + message, e);
}
}
- protected Command extractCommand(Message message) throws JMSException
- {
- Command command = null;
- if (message instanceof ObjectMessage)
- {
+ protected Command extractCommand(Message message) throws JMSException {
+ if (message instanceof ObjectMessage) {
log.debug("deserializing command from jms message...");
- ObjectMessage objectMessage = (ObjectMessage)message;
+ ObjectMessage objectMessage = (ObjectMessage) message;
Serializable object = objectMessage.getObject();
- if (object instanceof Command)
- {
- command = (Command)object;
+ if (object instanceof Command) {
+ return (Command) object;
}
- else
- {
- log.warn("ignoring object message cause it isn't a command '" + object + "'" + (object != null ? " (" + object.getClass().getName() + ")" : ""));
+ else {
+ log.warn("not a command: " + object);
}
}
- else
- {
- log.warn("ignoring message '" + message + "' cause it isn't an ObjectMessage (" + message.getClass().getName() + ")");
+ else {
+ log.warn("not an object message: " + message);
}
- return command;
+ return null;
}
- private void discard(Message message) throws JMSException
- {
- if (deadLetterQueue == null)
- {
+ private void discard(Message message) throws JMSException {
+ if (deadLetterQueue == null) {
// lookup dead letter queue
- try
- {
+ try {
Context initial = new InitialContext();
- deadLetterQueue = (Destination)initial.lookup("java:comp/env/jms/DeadLetterQueue");
+ deadLetterQueue = (Destination) initial.lookup("java:comp/env/jms/DeadLetterQueue");
}
- catch (NamingException e)
- {
+ catch (NamingException e) {
log.debug("failed to retrieve dead letter queue, rejecting message: " + message);
messageDrivenContext.setRollbackOnly();
return;
@@ -174,70 +154,58 @@
}
// send message to dead letter queue
Session jmsSession = createSession();
- try
- {
+ try {
jmsSession.createProducer(deadLetterQueue).send(message);
}
- finally
- {
+ finally {
jmsSession.close();
}
}
- private void sendResult(Serializable result, Destination destination, String correlationId) throws JMSException
- {
+ private void sendResult(Serializable result, Destination destination, String correlationId)
+ throws JMSException {
log.debug("sending result " + result + " to " + destination);
Session jmsSession = createSession();
- try
- {
+ try {
Message resultMessage = jmsSession.createObjectMessage(result);
resultMessage.setJMSCorrelationID(correlationId);
jmsSession.createProducer(destination).send(resultMessage);
}
- finally
- {
+ finally {
jmsSession.close();
}
}
- private Session createSession() throws JMSException
- {
- if (jmsConnection == null)
- {
+ private Session createSession() throws JMSException {
+ if (jmsConnection == null) {
// lookup factory and create jms connection
- try
- {
+ try {
Context initial = new InitialContext();
- ConnectionFactory jmsConnectionFactory = (ConnectionFactory)initial.lookup("java:comp/env/jms/JbpmConnectionFactory");
+ ConnectionFactory jmsConnectionFactory = (ConnectionFactory) initial.lookup("java:comp/env/jms/JbpmConnectionFactory");
jmsConnection = jmsConnectionFactory.createConnection();
}
- catch (NamingException e)
- {
+ catch (NamingException e) {
throw new EJBException("error retrieving jms connection factory", e);
}
}
/*
- * if the connection supports xa, the session will be transacted, else the session will auto acknowledge; in either case no explicit transaction control must be
- * performed - see ejb 2.1 - 17.3.5
+ * if the connection supports xa, the session will be transacted, else the session will auto
+ * acknowledge; in either case no explicit transaction control must be performed - see ejb 2.1 -
+ * 17.3.5
*/
return jmsConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
}
- public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
- {
+ public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext) {
this.messageDrivenContext = messageDrivenContext;
}
- public void ejbRemove()
- {
- if (jmsConnection != null)
- {
- try
- {
+ public void ejbRemove() {
+ if (jmsConnection != null) {
+ try {
jmsConnection.close();
}
- catch (JMSException e)
- {
+ catch (JMSException e) {
log.debug("failed to close jms connection", e);
}
jmsConnection = null;
@@ -247,20 +215,16 @@
messageDrivenContext = null;
}
- public void ejbCreate()
- {
- try
- {
+ public void ejbCreate() {
+ try {
Context initial = new InitialContext();
- LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome)initial.lookup("java:comp/env/ejb/LocalCommandServiceBean");
+ LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome) initial.lookup("java:comp/env/ejb/LocalCommandServiceBean");
commandService = commandServiceHome.create();
}
- catch (NamingException e)
- {
+ catch (NamingException e) {
throw new EJBException("error retrieving command service home", e);
}
- catch (CreateException e)
- {
+ catch (CreateException e) {
throw new EJBException("error creating command service", e);
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageService.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageService.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -28,119 +28,136 @@
import javax.jms.MessageProducer;
import javax.jms.Session;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.db.JobSession;
+import org.jbpm.graph.exe.Token;
import org.jbpm.job.Job;
import org.jbpm.msg.MessageService;
+import org.jbpm.svc.Services;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.tx.TxService;
public class JmsMessageService implements MessageService {
private static final long serialVersionUID = 1L;
- JobSession jobSession = null;
- Connection connection = null;
- Session session = null;
- Destination destination = null;
- MessageProducer messageProducer = null;
- boolean isCommitEnabled = false;
+ private static final Log log = LogFactory.getLog(JmsMessageService.class);
- public JmsMessageService(Connection connection, Destination destination, boolean isCommitEnabled) throws JMSException {
+ final JobSession jobSession;
+
+ final Connection connection;
+ final Session session;
+ final MessageProducer messageProducer;
+
+ final boolean isCommitEnabled;
+
+ /**
+ * @deprecated use {@link #JmsMessageService(JmsMessageServiceFactory)} instead
+ */
+ public JmsMessageService(Connection connection, Destination destination, boolean isCommitEnabled)
+ throws JMSException {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
- if (jbpmContext==null) {
- throw new JbpmException("jms message service must be created inside a jbpm context");
+ if (jbpmContext == null) throw new JbpmException("no active jbpm context");
+ jobSession = jbpmContext.getJobSession();
+
+ this.connection = connection;
+
+ if (isCommitEnabled) {
+ session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ this.isCommitEnabled = true;
}
- this.jobSession = jbpmContext.getJobSession();
+ else {
+ session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ this.isCommitEnabled = false;
+ }
- this.connection = connection;
- this.destination = destination;
- this.isCommitEnabled = isCommitEnabled;
- /*
- * If the connection supports XA, the session will always take part in the global transaction.
- * Otherwise the first parameter specifies whether message productions and consumptions
- * are part of a single transaction (TRUE) or performed immediately (FALSE).
- * Messages are never meant to be received before the database transaction commits,
- * hence the transacted is preferable.
- */
- session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ messageProducer = session.createProducer(destination);
}
+ public JmsMessageService(JmsMessageServiceFactory factory) throws JMSException {
+ this(factory.getConnectionFactory().createConnection(), factory.getDestination(),
+ factory.isCommitEnabled());
+ }
+
public void send(Job job) {
+ jobSession.saveJob(job);
+
try {
- jobSession.saveJob(job);
-
Message message = session.createMessage();
message.setLongProperty("jobId", job.getId());
- if (job.getToken()!=null) {
- message.setLongProperty("tokenId", job.getToken().getId());
- }
- if (job.getProcessInstance()!=null) {
+
+ Token token = job.getToken();
+ if (token != null) {
+ message.setLongProperty("tokenId", token.getId());
message.setLongProperty("processInstanceId", job.getProcessInstance().getId());
}
- if (job.getTaskInstance()!=null) {
- message.setLongProperty("taskInstanceId", job.getTaskInstance().getId());
+
+ TaskInstance taskInstance = job.getTaskInstance();
+ if (taskInstance != null) {
+ message.setLongProperty("taskInstanceId", taskInstance.getId());
}
+
modifyMessage(message, job);
- getMessageProducer().send(message);
- } catch (JMSException e) {
- throw new JbpmException("couldn't send jms message", e);
+ messageProducer.send(message);
}
+ catch (JMSException e) {
+ throw new JbpmException("could not send jms message", e);
+ }
}
/**
- * Hook to modify the message, e.g. adding additional properties
- * to the header required by the own application. One possible
- * use case is to rescue the actor id over the "JMS" intermezzo
- * of asynchronous continuations.
+ * Hook to modify the message, e.g. adding extra properties to the header required by the own
+ * application. One possible use case is to rescue the actor id over the "JMS" intermezzo of
+ * asynchronous continuations.
*/
- public void modifyMessage(Message message, Job job) throws JMSException {
+ protected void modifyMessage(Message message, Job job) throws JMSException {
}
public void close() {
- JbpmException exception = null;
+ try {
+ messageProducer.close();
+ }
+ catch (JMSException e) {
+ log.warn("could not close message producer", e);
+ }
- if (messageProducer!=null) {
+ JMSException commitException = null;
+ if (isCommitEnabled) {
+ TxService txService = (TxService) Services.getCurrentService(Services.SERVICENAME_TX);
try {
- messageProducer.close();
- } catch (Exception e) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- exception = new JbpmException("couldn't close message producer", e);
- }
- }
-
- if (session!=null) {
- if (isCommitEnabled) {
- try {
+ if (txService.isRollbackOnly()) {
+ session.rollback();
+ }
+ else {
session.commit();
- } catch (Exception e) {
- if (exception==null) {
- exception = new JbpmException("couldn't commit JMS session", e);
- }
}
}
-
- try {
- session.close();
- } catch (Exception e) {
- if (exception==null) {
- exception = new JbpmException("couldn't close JMS session", e);
- }
+ catch (JMSException e) {
+ commitException = e;
}
}
- if (connection!=null) {
- try {
- connection.close();
- } catch (Exception e) {
- if (exception==null) {
- exception = new JbpmException("couldn't close JMS connection", e);
- }
- }
+ try {
+ session.close();
}
+ catch (JMSException e) {
+ log.warn("could not close jms session", e);
+ }
- if (exception!=null) {
- throw exception;
+ try {
+ connection.close();
}
+ catch (JMSException e) {
+ log.warn("could not close jms connection", e);
+ }
+
+ if (commitException != null) {
+ throw new JbpmException("could not commit jms session", commitException);
+ }
}
public Session getSession() {
@@ -148,9 +165,6 @@
}
protected MessageProducer getMessageProducer() throws JMSException {
- if (messageProducer==null) {
- messageProducer = session.createProducer(destination);
- }
return messageProducer;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -21,7 +21,6 @@
*/
package org.jbpm.msg.jms;
-import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
@@ -35,9 +34,8 @@
import org.jbpm.svc.ServiceFactory;
/**
- * The JMS message service leverages the reliable communication infrastructure
- * accessed through JMS interfaces to deliver asynchronous continuation
- * messages to the {@link JobListenerBean}.
+ * The JMS message service leverages the reliable communication infrastructure available through JMS
+ * interfaces to deliver asynchronous continuation messages to the {@link JobListenerBean}.
*
* <h3>Configuration</h3>
*
@@ -54,103 +52,68 @@
* @author Tom Baeyens
* @author Alejandro Guizar
*/
-public class JmsMessageServiceFactory implements ServiceFactory
-{
+public class JmsMessageServiceFactory implements ServiceFactory {
+
private static final long serialVersionUID = 1L;
String connectionFactoryJndiName = "java:comp/env/jms/JbpmConnectionFactory";
String destinationJndiName = "java:comp/env/jms/JobQueue";
- String commandDestinationJndiName = "java:comp/env/jms/CommandQueue";
- boolean isCommitEnabled = false;
+ boolean isCommitEnabled;
+
private ConnectionFactory connectionFactory;
private Destination destination;
- private Destination commandDestination;
- public ConnectionFactory getConnectionFactory()
- {
- if (connectionFactory == null)
- {
- try
- {
- connectionFactory = (ConnectionFactory)lookup(connectionFactoryJndiName);
+ public ConnectionFactory getConnectionFactory() {
+ if (connectionFactory == null) {
+ try {
+ connectionFactory = (ConnectionFactory) lookup(connectionFactoryJndiName);
}
- catch (NamingException e)
- {
+ catch (NamingException e) {
throw new JbpmException("could not retrieve message connection factory", e);
}
}
return connectionFactory;
}
- public Destination getDestination()
- {
- if (destination == null)
- {
- try
- {
- destination = (Destination)lookup(destinationJndiName);
+ public Destination getDestination() {
+ if (destination == null) {
+ try {
+ destination = (Destination) lookup(destinationJndiName);
}
- catch (NamingException e)
- {
+ catch (NamingException e) {
throw new JbpmException("could not retrieve job destination", e);
}
}
return destination;
}
- public Destination getCommandDestination()
- {
- if (commandDestination == null)
- {
- try
- {
- commandDestination = (Destination)lookup(commandDestinationJndiName);
- }
- catch (NamingException e)
- {
- throw new JbpmException("could not retrieve command destination", e);
- }
- }
- return commandDestination;
- }
-
- public boolean isCommitEnabled()
- {
+ public boolean isCommitEnabled() {
return isCommitEnabled;
}
- private static Object lookup(String name) throws NamingException
- {
+ private static Object lookup(String name) throws NamingException {
Context initial = new InitialContext();
- try
- {
+ try {
return initial.lookup(name);
}
- finally
- {
+ finally {
initial.close();
}
}
- public Service openService()
- {
- try
- {
- Connection connection = getConnectionFactory().createConnection();
- return new JmsMessageService(connection, getDestination(), isCommitEnabled);
+ public Service openService() {
+ try {
+ return new JmsMessageService(this);
}
- catch (JMSException e)
- {
- throw new JbpmException("couldn't open message session", e);
+ catch (JMSException e) {
+ throw new JbpmException("could not open message service", e);
}
}
- public void close()
- {
+ public void close() {
connectionFactory = null;
destination = null;
- commandDestination = null;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactoryImpl.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactoryImpl.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactoryImpl.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -28,8 +28,8 @@
import org.jbpm.svc.Service;
/**
- * Alias for {@link JmsMessageServiceFactory}, supplied for compatibility
- * with the jBPM 3.2 series.
+ * Alias for {@link JmsMessageServiceFactory}, supplied for compatibility with jBPM 3.2.2.
+ *
* @deprecated replaced by {@link JmsMessageServiceFactory}
*/
public class JmsMessageServiceFactoryImpl extends JmsMessageServiceFactory {
@@ -40,10 +40,10 @@
try {
Connection connection = getConnectionFactory().createConnection();
return new JmsMessageServiceImpl(connection, getDestination(), isCommitEnabled);
- }
+ }
catch (JMSException e) {
throw new JbpmException("couldn't open message session", e);
- }
+ }
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceImpl.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceImpl.java 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceImpl.java 2009-08-07 08:54:13 UTC (rev 5441)
@@ -26,15 +26,16 @@
import javax.jms.JMSException;
/**
- * Alias for {@link JmsMessageService}, supplied for compatibility with the
- * jBPM 3.2 series.
+ * Alias for {@link JmsMessageService}, supplied for compatibility with jBPM 3.2.2.
+ *
* @deprecated replaced by {@link JmsMessageService}
*/
public class JmsMessageServiceImpl extends JmsMessageService {
private static final long serialVersionUID = 1L;
-
- public JmsMessageServiceImpl(Connection connection, Destination destination, boolean isCommitEnabled) throws JMSException {
+
+ public JmsMessageServiceImpl(Connection connection, Destination destination,
+ boolean isCommitEnabled) throws JMSException {
super(connection, destination, isCommitEnabled);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/enterprise.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/enterprise.xml 2009-08-07 07:33:14 UTC (rev 5440)
+++ jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/enterprise.xml 2009-08-07 08:54:13 UTC (rev 5441)
@@ -261,24 +261,35 @@
<itemizedlist>
- <listitem><literal>connectionFactoryJndiName</literal>: the name of the JMS connection factory
- in the JNDI initial context. Defaults to <literal>java:comp/env/jms/JbpmConnectionFactory</literal>.
+ <listitem><literal>connectionFactoryJndiName</literal>: the JNDI name of the JMS connection
+ factory. Defaults to <literal>java:comp/env/jms/JbpmConnectionFactory</literal>.
</listitem>
- <listitem><literal>destinationJndiName</literal>: the name of the JMS destination where job
- messages will be sent. Must match the destination from which <literal>JobListenerBean</literal>
+ <listitem><literal>destinationJndiName</literal>: the JNDI name of the JMS destination where
+ job messages are sent. Must match the destination where <literal>JobListenerBean</literal>
receives messages. Defaults to <literal>java:comp/env/jms/JobQueue</literal>.
</listitem>
- <listitem><literal>isCommitEnabled</literal>: tells whether jBPM should commit the JMS session
- upon <literal>JbpmContext.close()</literal>. Messages produced by the JMS message service are
- never meant to be received before the current transaction commits; hence the JMS sessions
- created by the service are always transacted. The default value -<literal>false</literal>- is
- appropriate when the connection factory in use is XA capable, as the JMS session's produced
- messages will be controlled by the overall JTA transaction. This field should be set to
- <literal>true</literal> if the JMS connection factory is not XA capable so that jBPM commits
- the JMS session's local transaction explicitly.
+ <listitem><literal>isCommitEnabled</literal>: tells whether the message service should
+ create a transacted session and either commit or rollback on close. Messages produced by the
+ JMS message service are never meant to be received before the database transaction commits.
+ The <ulink url="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS7.html#wp92011">J2EE
+ tutorial</ulink> states "when you create a session in an enterprise bean, the container
+ ignores the arguments you specify, because it manages all transactional properties for
+ enterprise beans". Unfortunately the tutorial fails to indicate that said behavior is not
+ prescriptive. JBoss ignores the <literal>transacted</literal> argument if the
+ connection factory supports XA, since the overall JTA transaction controls the session.
+ Otherwise, <literal>transacted</literal> produces a locally transacted session. In <ulink
+ url="http://e-docs.bea.com/wls/docs103/jms/trans.html">Weblogic</ulink>, JMS transacted
+ sessions are agnostic to JTA transactions even if the connection factory is XA enabled.
+ With <literal>isCommitEnabled</literal> set to <literal>false</literal> (the default),
+ the message service creates a nontransacted, auto-acknowledging session. Such a session
+ works with containers that either disregard the creation arguments or do not bind
+ transacted sessions to JTA. Conversely, setting <literal>isCommitEnabled</literal> to
+ <literal>true</literal> causes the message service to create a transacted session and commit
+ or rollback according to the <literal>TxService.isRollbackOnly</literal> method.
</listitem>
+
</itemizedlist>
<para><literal>EntitySchedulerServiceFactory</literal> builds on the transactional notification
14 years, 9 months
JBoss JBPM SVN: r5440 - jbpm4/trunk.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-07 03:33:14 -0400 (Fri, 07 Aug 2009)
New Revision: 5440
Modified:
jbpm4/trunk/pom.xml
Log:
changed enterprise dependency on cactus to cactus.core
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-08-07 07:29:53 UTC (rev 5439)
+++ jbpm4/trunk/pom.xml 2009-08-07 07:33:14 UTC (rev 5440)
@@ -47,6 +47,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<apache.ant.version>1.7.0</apache.ant.version>
<cactus.version>1.8.1</cactus.version>
+ <aspectjrt.version>1.5.3</aspectjrt.version>
<freemarker.version>2.3.15</freemarker.version>
<gwt.console.version>1.0.1-SNAPSHOT</gwt.console.version>
<jbpm.gpd.version>4.1-SNAPSHOT</jbpm.gpd.version>
@@ -206,6 +207,11 @@
<!-- External dependencies -->
<!-- Please sort by groupid -->
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>${aspectjrt.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
@@ -213,10 +219,20 @@
</dependency>
<dependency>
<groupId>cactus</groupId>
- <artifactId>cactus</artifactId>
+ <artifactId>cactus.core</artifactId>
<version>${cactus.version}</version>
</dependency>
<dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.ant</artifactId>
+ <version>${cactus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ <version>${cactus.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
@@ -522,6 +538,13 @@
</profile>
<profile>
+ <id>integration</id>
+ <modules>
+ <module>modules/test-cactus</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>load</id>
<modules>
<module>modules/test-load</module>
14 years, 9 months
JBoss JBPM SVN: r5439 - jbpm4/trunk/modules/enterprise.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-07 03:29:53 -0400 (Fri, 07 Aug 2009)
New Revision: 5439
Modified:
jbpm4/trunk/modules/enterprise/pom.xml
Log:
changed enterprise dependency on cactus to cactus.core
Modified: jbpm4/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/pom.xml 2009-08-06 20:26:09 UTC (rev 5438)
+++ jbpm4/trunk/modules/enterprise/pom.xml 2009-08-07 07:29:53 UTC (rev 5439)
@@ -59,7 +59,7 @@
<dependency>
<groupId>cactus</groupId>
- <artifactId>cactus</artifactId>
+ <artifactId>cactus.core</artifactId>
<scope>test</scope>
</dependency>
14 years, 9 months