[jbpm-commits] JBoss JBPM SVN: r2058 - in jbpm3/trunk/modules: distribution/scripts and 11 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Sep 1 09:52:15 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-09-01 09:52:15 -0400 (Mon, 01 Sep 2008)
New Revision: 2058
Added:
jbpm3/trunk/modules/enterprise/scripts/
jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml
jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
jbpm3/trunk/modules/enterprise/src/test/resources/webapp/
Removed:
jbpm3/trunk/modules/enterprise/src/test/ear/
jbpm3/trunk/modules/enterprise/src/test/webapp/
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
jbpm3/trunk/modules/distribution/scripts/install-definition.xml
jbpm3/trunk/modules/enterprise/pom.xml
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
jbpm3/trunk/modules/enterprise/src/test/resources/cactus.properties
jbpm3/trunk/modules/enterprise/src/test/resources/webapp/WEB-INF/jboss-web.xml
jbpm3/trunk/modules/enterprise/src/test/resources/webapp/WEB-INF/web.xml
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/JobExecutorLauncher.java
jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
Log:
WIP - enterprise tests
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -46,6 +46,12 @@
</dependency>
<dependency>
<groupId>org.jboss.jbpm</groupId>
+ <artifactId>jbpm-enterprise</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-jpdl-core</artifactId>
<version>${version}</version>
</dependency>
Modified: jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/distribution/scripts/antrun-installer.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -77,7 +77,7 @@
<!-- ================================================================== -->
<target name="configure" depends="init">
- <property name="hibernate.cfg.xml" value="${deploy.artifacts.resources}/jbpm-jpdl-core-config/hibernate.cfg.xml"/>
+ <property name="hibernate.cfg.xml" value="${deploy.artifacts.resources}/jbpm-config/hibernate.cfg.xml"/>
<macro-disable file="${hibernate.cfg.xml}" section="JDBC connection properties"/>
<macro-enable file="${hibernate.cfg.xml}" section="DataSource properties"/>
Modified: jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/distribution/scripts/assembly-deploy-artifacts.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -16,9 +16,10 @@
<unpack>false</unpack>
</dependencySet>
<dependencySet>
- <outputDirectory>resources/jbpm-jpdl-core-config</outputDirectory>
+ <outputDirectory>resources/jbpm-config</outputDirectory>
<useStrictFiltering>true</useStrictFiltering>
<includes>
+ <include>*:jbpm-enterprise:jar:config</include>
<include>*:jbpm-jpdl-core:jar:config</include>
</includes>
<unpack>true</unpack>
Modified: jbpm3/trunk/modules/distribution/scripts/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/distribution/scripts/install-definition.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -71,8 +71,10 @@
<!-- jBPM Distro config -->
<pack name="jBPM3 Config" required="yes" installGroups="Main">
<description>The jBPM default configuration</description>
- <file src="@{deploy.artifacts.dir}/resources/jbpm-jpdl-core-config/hibernate.cfg.xml"
- targetdir="$INSTALL_PATH/server/@{jboss.server.instance}/deploy/jbpm/jbpm-service.sar"/>
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-config" targetdir="$INSTALL_PATH/server/@{jboss.server.instance}/deploy/jbpm/jbpm-service.sar">
+ <include name="hibernate.cfg.xml"/>
+ <include name="jbpm.cfg.xml"/>
+ </fileset>
</pack>
<!-- jBPM Hypersonic Database -->
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -10,15 +10,13 @@
<!-- ====================================================================== -->
<!-- $Id$ -->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<name>JBoss jBPM - Enterprise</name>
<groupId>org.jboss.jbpm</groupId>
<artifactId>jbpm-enterprise</artifactId>
- <packaging>ejb</packaging>
+ <packaging>jar</packaging>
<!-- Parent -->
<parent>
@@ -47,14 +45,31 @@
<artifactId>jms</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>org.apache.cactus</groupId>
- <artifactId>cactus.core.framework.javaEE.12-13-14</artifactId>
+ <artifactId>cactus.core.framework.wrapper.javaEE.14</artifactId>
+ <version>1.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ <version>1.8.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -64,41 +79,78 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <scope>provided</scope>
- </dependency>
</dependencies>
<!-- Plugins -->
<build>
<plugins>
<plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>build-jars</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tests.output.dir" value="${project.build.directory}" />
+ <property name="tests.resources.dir" value="${basedir}/src/test/resources" />
+ <ant antfile="scripts/antrun-test-jars.xml" target="build-test-jars" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/test-dependencies</outputDirectory>
+ <includeScope>test</includeScope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showDeprecation>false</showDeprecation>
</configuration>
</plugin>
<plugin>
- <artifactId>maven-ejb-plugin</artifactId>
+ <artifactId>maven-jar-plugin</artifactId>
<configuration>
- <ejbVersion>2.1</ejbVersion>
+ <excludes>
+ <exclude>jbpm.cfg.xml</exclude>
+ </excludes>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- [JBPM-1287] ant test produces errors in 3.2.3.GA -->
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
</plugins>
</build>
-
</project>
\ No newline at end of file
Added: jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml (rev 0)
+++ jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <description>jBPM enterprise test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-test-jars" description="Build the test deployments">
+
+ <mkdir dir="${tests.output.dir}/test-libs"/>
+
+ <!-- enterprise-test -->
+ <war warfile="${tests.output.dir}/test-libs/enterprise-test.war" webxml="${tests.resources.dir}/webapp/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes"/>
+ <lib dir="${tests.output.dir}/test-dependencies">
+ <include name="aspectjrt*.jar"/>
+ <include name="cactus*.jar"/>
+ <include name="junit*.jar"/>
+ </lib>
+ <webinf dir="${tests.resources.dir}/webapp/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
+ <!-- Please add alphabetically -->
+
+ </target>
+
+</project>
Property changes on: jbpm3/trunk/modules/enterprise/scripts/antrun-test-jars.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml (rev 0)
+++ jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -0,0 +1,17 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>jbpm.cfg.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/enterprise/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -0,0 +1,38 @@
+<jbpm-configuration>
+
+ <jbpm-context>
+ <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
+ <service name="message" factory="org.jbpm.msg.jms.JmsMessageServiceFactoryImpl" />
+ <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />
+ <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
+ <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
+ <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
+ </jbpm-context>
+
+ <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
+ <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
+
+ <!-- configuration resource files pointing to default configuration files in jbpm-jpdl.jar -->
+ <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
+ <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
+ <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
+ <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
+ <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
+ <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
+ <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
+ <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
+
+ <int name="jbpm.byte.block.size" value="1024" singleton="true" />
+ <string name="jbpm.mail.smtp.host" value="localhost" />
+ <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
+ <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
+ <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
+
+ <!--
+ Note, that the default job executor needs to be overwritten with a null value.
+ In the enterprise configuration there should be no job executor.
+ Async messaging is there bound to jms and timers to ejb timers.
+ -->
+ <null name="jbpm.job.executor" />
+
+</jbpm-configuration>
Property changes on: jbpm3/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java 2008-09-01 13:52:15 UTC (rev 2058)
@@ -21,6 +21,7 @@
*/
package org.jbpm.msg.jms;
+import java.rmi.RemoteException;
import java.util.Iterator;
import java.util.Set;
import java.util.Timer;
@@ -37,25 +38,25 @@
import org.jbpm.command.Command;
import org.jbpm.command.DeployProcessCommand;
import org.jbpm.command.StartProcessInstanceCommand;
-import org.jbpm.ejb.LocalCommandService;
-import org.jbpm.ejb.LocalCommandServiceHome;
+import org.jbpm.ejb.RemoteCommandService;
+import org.jbpm.ejb.RemoteCommandServiceHome;
import org.jbpm.enterprise.test.ActionRecorder;
import org.jbpm.enterprise.test.Recorder;
public class AsyncProcessingTest extends ServletTestCase {
- private LocalCommandService commandService;
+ private RemoteCommandService commandService;
static int nbrOfConcurrentProcessExecutions = 20;
static int maxWaitTime = 30000;
protected void setUp() throws Exception {
InitialContext initialContext = new InitialContext();
- LocalCommandServiceHome localCommandServiceHome = (LocalCommandServiceHome) initialContext.lookup("java:comp/env/ejb/LocalCommandServiceBean");
+ RemoteCommandServiceHome localCommandServiceHome = (RemoteCommandServiceHome) initialContext.lookup("ejb/CommandServiceBean");
commandService = localCommandServiceHome.create();
}
- public void testBulkJobs() {
+ public void testBulkJobs() throws RemoteException {
Recorder.resetCollections();
deleteAllJobs();
deployProcess();
@@ -66,7 +67,7 @@
assertEquals(expectedResults, Recorder.collectedResults);
}
- protected void deleteAllJobs() {
+ protected void deleteAllJobs() throws RemoteException {
execute( new Command() {
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
@@ -77,12 +78,12 @@
});
}
- protected Object execute(Command command) {
+ protected Object execute(Command command) throws RemoteException {
return commandService.execute(command);
}
- protected void deployProcess() {
+ protected void deployProcess() throws RemoteException {
log.debug("start deploy process");
execute(new DeployProcessCommand(
"<process-definition name='bulk messages'>" +
@@ -121,7 +122,7 @@
"</process-definition>"));
}
- protected void launchProcesses() {
+ protected void launchProcesses() throws RemoteException {
for (int i=0; i<nbrOfConcurrentProcessExecutions; i++) {
StartProcessInstanceCommand command = new StartProcessInstanceCommand();
command.setProcessName("bulk messages");
@@ -146,7 +147,7 @@
return expectedResults;
}
- private void processAllJobs(final long maxWait) {
+ private void processAllJobs(final long maxWait) throws RemoteException {
boolean jobsAvailable = true;
// install a timer that will interrupt if it takes too long
@@ -175,7 +176,7 @@
}
}
- protected int getNbrOfJobsAvailable() {
+ protected int getNbrOfJobsAvailable() throws RemoteException {
Integer nbrOfJobsAvailable = (Integer) execute( new Command() {
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
@@ -192,7 +193,7 @@
return nbrOfJobsAvailable.intValue();
}
- protected boolean areJobsAvailable() {
+ protected boolean areJobsAvailable() throws RemoteException {
return (getNbrOfJobsAvailable()>0);
}
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-09-01 13:52:15 UTC (rev 2058)
@@ -46,7 +46,7 @@
protected void setUp() throws Exception {
if (commandServiceHome == null) {
InitialContext initialContext = new InitialContext();
- commandServiceHome = (LocalCommandServiceHome) initialContext.lookup("java:comp/env/ejb/LocalCommandServiceBean");
+ commandServiceHome = (LocalCommandServiceHome) initialContext.lookup("java:ejb/CommandServiceBean");
}
commandService = commandServiceHome.create();
}
Modified: jbpm3/trunk/modules/enterprise/src/test/resources/cactus.properties
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/resources/cactus.properties 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/enterprise/src/test/resources/cactus.properties 2008-09-01 13:52:15 UTC (rev 2058)
@@ -1 +1 @@
-cactus.contextURL = http://localhost:8080/test
\ No newline at end of file
+cactus.contextURL = http://localhost:8080/enterprise-test
\ No newline at end of file
Copied: jbpm3/trunk/modules/enterprise/src/test/resources/webapp (from rev 2053, jbpm3/trunk/modules/enterprise/src/test/webapp)
Modified: jbpm3/trunk/modules/enterprise/src/test/resources/webapp/WEB-INF/jboss-web.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/webapp/WEB-INF/jboss-web.xml 2008-08-31 12:29:31 UTC (rev 2053)
+++ jbpm3/trunk/modules/enterprise/src/test/resources/webapp/WEB-INF/jboss-web.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -3,12 +3,29 @@
"-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd" >
<jboss-web>
+
<resource-ref>
<res-ref-name>jdbc/JbpmDataSource</res-ref-name>
<jndi-name>java:/JbpmDS</jndi-name>
</resource-ref>
+
<resource-ref>
<res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
<jndi-name>java:JmsXA</jndi-name>
</resource-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/CommandServiceBean</ejb-ref-name>
+ <local-jndi-name>java:ejb/CommandServiceBean</local-jndi-name>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <local-jndi-name>java:ejb/TimerEntityBean</local-jndi-name>
+ </ejb-local-ref>
+
+ <message-destination-ref>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <jndi-name>queue/JbpmJobQueue</jndi-name>
+ </message-destination-ref>
</jboss-web>
\ No newline at end of file
Modified: jbpm3/trunk/modules/enterprise/src/test/resources/webapp/WEB-INF/web.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/webapp/WEB-INF/web.xml 2008-08-31 12:29:31 UTC (rev 2053)
+++ jbpm3/trunk/modules/enterprise/src/test/resources/webapp/WEB-INF/web.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -15,19 +15,17 @@
</servlet-mapping>
<ejb-local-ref>
- <ejb-ref-name>ejb/LocalCommandServiceBean</ejb-ref-name>
+ <ejb-ref-name>ejb/CommandServiceBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalCommandServiceHome</local-home>
<local>org.jbpm.ejb.LocalCommandService</local>
- <ejb-link>CommandServiceBean</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
- <ejb-ref-name>ejb/LocalTimerEntityBean</ejb-ref-name>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
<local>org.jbpm.ejb.LocalTimerEntity</local>
- <ejb-link>TimerEntityBean</ejb-link>
</ejb-local-ref>
<resource-ref>
@@ -46,7 +44,6 @@
<message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
- <message-destination-link>JobQueue</message-destination-link>
</message-destination-ref>
</web-app>
Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/db/hibernate/HibernateHelper.java 2008-09-01 13:52:15 UTC (rev 2058)
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -74,11 +75,15 @@
Configuration configuration = new Configuration();
// if a special hibernate configuration xml file is specified,
- if (cfgXmlResource!=null) {
+ if (cfgXmlResource != null)
+ {
// use the configured file name
- log.debug("creating hibernate configuration resource '"+cfgXmlResource+"'");
+ URL cfgURL = Thread.currentThread().getContextClassLoader().getResource(cfgXmlResource);
+ log.debug("creating hibernate configuration resource '" + cfgURL + "'");
configuration.configure(cfgXmlResource);
- } else {
+ }
+ else
+ {
log.debug("using default hibernate configuration resource (hibernate.cfg.xml)");
configuration.configure();
}
Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/JobExecutorLauncher.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/JobExecutorLauncher.java 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/web/JobExecutorLauncher.java 2008-09-01 13:52:15 UTC (rev 2058)
@@ -25,6 +25,7 @@
import javax.servlet.ServletContextListener;
import org.jbpm.JbpmConfiguration;
+import org.jbpm.job.executor.JobExecutor;
/**
* Starts the job executor on servlet context initialization and stops it on
@@ -50,14 +51,17 @@
private JbpmConfiguration jbpmConfiguration;
public void contextInitialized(ServletContextEvent event) {
- String jbpmCfgResource = event.getServletContext().getInitParameter(
- "jbpm.configuration.resource");
+ String jbpmCfgResource = event.getServletContext().getInitParameter("jbpm.configuration.resource");
jbpmConfiguration = JbpmConfiguration.getInstance(jbpmCfgResource);
- jbpmConfiguration.getJobExecutor().start();
+ JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
+ if (jobExecutor != null)
+ jobExecutor.start();
}
public void contextDestroyed(ServletContextEvent event) {
- jbpmConfiguration.getJobExecutor().stop();
+ JobExecutor jobExecutor = jbpmConfiguration.getJobExecutor();
+ if (jobExecutor != null)
+ jobExecutor.stop();
}
}
Modified: jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml 2008-09-01 12:30:40 UTC (rev 2057)
+++ jbpm3/trunk/modules/jpdl/core/src/main/resources/hibernate.mapping.xml 2008-09-01 13:52:15 UTC (rev 2058)
@@ -1,3 +1,4 @@
+
<!-- ############################################ -->
<!-- # mapping files with external dependencies # -->
<!-- ############################################ -->
@@ -5,18 +6,6 @@
<!-- Additional mappings defined per module go here -->
<mapping resource="hibernate.extra.hbm.xml" />
- <!-- following mapping files have a dependency on -->
- <!-- 'jbpm-identity.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- Uncomment the following 3 lines if you -->
- <!-- want to use the jBPM identity mgmgt -->
- <!-- component. -->
- <!--
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
- -->
-
<!-- following mapping files have a dependency on the JCR API -->
<!--
<mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
More information about the jbpm-commits
mailing list