[jbpm-commits] JBoss JBPM SVN: r6508 - in jbpm4/trunk: modules/test-concurrent and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sun Jul 18 03:00:28 EDT 2010


Author: alex.guizar at jboss.com
Date: 2010-07-18 03:00:28 -0400 (Sun, 18 Jul 2010)
New Revision: 6508

Added:
   jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/CommandExecutionSynchronization.java
   jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/ConcurrentJbpmTestCase.java
   jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/SynchronizableCommandExecutor.java
Removed:
   jbpm4/trunk/modules/test-concurrent/src/main/
Modified:
   jbpm4/trunk/modules/test-concurrent/
   jbpm4/trunk/modules/test-concurrent/.classpath
   jbpm4/trunk/modules/test-concurrent/pom.xml
   jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.cfg.xml
   jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml
   jbpm4/trunk/modules/test-upgrade/pom.xml
   jbpm4/trunk/pom.xml
Log:
JBPM-2893 revive test-concurrent module


Property changes on: jbpm4/trunk/modules/test-concurrent
___________________________________________________________________
Name: svn:ignore
   - target

   + target
.settings


Modified: jbpm4/trunk/modules/test-concurrent/.classpath
===================================================================
--- jbpm4/trunk/modules/test-concurrent/.classpath	2010-07-18 06:00:34 UTC (rev 6507)
+++ jbpm4/trunk/modules/test-concurrent/.classpath	2010-07-18 07:00:28 UTC (rev 6508)
@@ -1,10 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
 	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
 	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: jbpm4/trunk/modules/test-concurrent/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-concurrent/pom.xml	2010-07-18 06:00:34 UTC (rev 6507)
+++ jbpm4/trunk/modules/test-concurrent/pom.xml	2010-07-18 07:00:28 UTC (rev 6508)
@@ -1,17 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!-- ====================================================================== -->
+<!--  jBPM: Workflow in Java                                                -->
 <!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
 <!--  Distributable under LGPL license.                                     -->
 <!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
 <!-- ====================================================================== -->
 
-<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">
+<!-- $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>jBPM 4 - Test DB</name>
+
+  <!-- Module Info -->
+  <name>jBPM 4 - Test Concurrent</name>
   <groupId>org.jbpm.jbpm4</groupId>
   <artifactId>jbpm-test-concurrent</artifactId>
   <packaging>jar</packaging>
@@ -26,7 +29,6 @@
 
   <!-- Dependencies -->
   <dependencies>
-
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-api</artifactId>
@@ -48,19 +50,17 @@
       <scope>test</scope>
     </dependency>
 
-	<!-- DB drivers -->
-	
-	<dependency>
-		<groupId>com.h2database</groupId>
-		<artifactId>h2</artifactId>
-		<version>1.1.114</version>
-	</dependency>
-	<dependency>
-		<groupId>postgresql</groupId>
-		<artifactId>postgresql</artifactId>
-		<version>8.3-603.jdbc4</version>
-	</dependency>
-
+    <!-- DB drivers -->
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <version>1.1.114</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>postgresql</groupId>
+      <artifactId>postgresql</artifactId>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
-
-</project>
\ No newline at end of file
+</project>


Property changes on: jbpm4/trunk/modules/test-concurrent/pom.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/CommandExecutionSynchronization.java (from rev 6505, jbpm4/trunk/modules/test-concurrent/src/main/java/org/jbpm/test/concurrent/CommandExecutionSynchronization.java)
===================================================================
--- jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/CommandExecutionSynchronization.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/CommandExecutionSynchronization.java	2010-07-18 07:00:28 UTC (rev 6508)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+/**
+ * 
+ */
+package org.jbpm.test.concurrent;
+
+/**
+ * Implementations can extend this class to add logic to sync points of the
+ * {@link SynchronizableCommandExecutor}.
+ * 
+ * @author Joram Barrez
+ */
+public abstract class CommandExecutionSynchronization {
+  
+  public void beforeTransactionStarts() { }
+  
+  public void afterTransactionStarted() { }
+  
+  public void beforeExecution() { }
+  
+  public void afterExecution() { }
+  
+  public void beforeTransactionDone() { }
+  
+  public void afterTransactionDone() { }
+
+}

Copied: jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/ConcurrentJbpmTestCase.java (from rev 6505, jbpm4/trunk/modules/test-concurrent/src/main/java/org/jbpm/test/concurrent/ConcurrentJbpmTestCase.java)
===================================================================
--- jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/ConcurrentJbpmTestCase.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/ConcurrentJbpmTestCase.java	2010-07-18 07:00:28 UTC (rev 6508)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+/**
+ * 
+ */
+package org.jbpm.test.concurrent;
+
+import org.jbpm.pvm.internal.env.EnvironmentFactory;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * Base class for unit tests involving testing concurrency.
+ * 
+ * @author Joram Barrez
+ */
+public abstract class ConcurrentJbpmTestCase extends JbpmTestCase {
+  
+  protected EnvironmentFactory environmentFactory;
+
+  protected void setUp() throws Exception {
+    super.setUp();
+    this.environmentFactory = (EnvironmentFactory) processEngine;
+  }
+
+}

Copied: jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/SynchronizableCommandExecutor.java (from rev 6505, jbpm4/trunk/modules/test-concurrent/src/main/java/org/jbpm/test/concurrent/SynchronizableCommandExecutor.java)
===================================================================
--- jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/SynchronizableCommandExecutor.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-concurrent/src/test/java/org/jbpm/test/concurrent/SynchronizableCommandExecutor.java	2010-07-18 07:00:28 UTC (rev 6508)
@@ -0,0 +1,348 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+/**
+ * 
+ */
+package org.jbpm.test.concurrent;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
+
+import org.jbpm.api.cmd.Command;
+import org.jbpm.api.job.Job;
+import org.jbpm.pvm.internal.cmd.ExecuteJobCmd;
+import org.jbpm.pvm.internal.env.EnvironmentFactory;
+import org.jbpm.pvm.internal.env.EnvironmentImpl;
+import org.jbpm.pvm.internal.tx.StandardTransaction;
+
+/**
+ * Executes a given command in a separate thread.
+ * 
+ * Has several sync points available (see {@link CommandExecutionSynchronization}):
+ * - before/after transaction is started
+ * - before/after job execution
+ * - before/after transaction is done (ie commit)
+ * 
+ * TODO: implement transaction sync, now only sync on job execution is done - waiting until use case passes by
+ * 
+ * @author Joram Barrez
+ */
+public class SynchronizableCommandExecutor extends Thread {
+    
+    /** Used to create environment blocks */
+    private EnvironmentFactory environmentFactory;
+  
+    /** The database id of the job that will be executed */
+    private String jobId;
+    
+    /** The command that will be executed */
+    private Command command;
+    
+    /** 
+     * If an exception occurs in a thread that is not the JUnit thread, then
+     * the JUnit thread will never notice this. The solution is to catch the
+     * exception and store it in this field, so the JUnit thread can check
+     * if there were any exceptions when executing the job.
+     */
+    private Exception exception;
+    
+    /** Indicates if the thread must be blocked (ie this.wait() must be called) */
+    private boolean threadBlocked;
+    
+    /**
+     * List of synchronizations that will be called on specific point in the
+     * execution of this thread.
+     */
+    private List<CommandExecutionSynchronization> synchronizations;
+    
+    /* SYNC PRIMITIVES */
+    
+    private CyclicBarrier afterExecutionBarrier;
+    
+    private List<SynchronizableCommandExecutor> executorsSyncedAfterExecution;
+    
+    private CyclicBarrier beforeExecutionBarrier;
+    
+    /**
+     * Constructor to be used when the thread must execute a job
+     */
+    public SynchronizableCommandExecutor(EnvironmentFactory environmentFactory, Job job) {
+      this.environmentFactory = environmentFactory;
+      this.jobId = job.getId();
+      this.threadBlocked = false;
+      
+      this.synchronizations = new ArrayList<CommandExecutionSynchronization>();
+      synchronizations.add(new DefaultSynchronization());
+    }
+    
+    /**
+     * Constructor to be used when the thread must execute a command
+     */
+    public SynchronizableCommandExecutor(EnvironmentFactory environmentFactory, Command command) {
+      this.environmentFactory = environmentFactory;
+      this.command = command;
+      this.threadBlocked = false;
+      
+      this.synchronizations = new ArrayList<CommandExecutionSynchronization>();
+      synchronizations.add(new DefaultSynchronization());
+    }
+    
+    public void run() {
+      
+      EnvironmentImpl environment = environmentFactory.openEnvironment();
+      StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
+      standardTransaction.begin();
+
+      try {
+        
+        handleBeforeExecutionSynchronizations();
+        
+        if (jobId != null) {
+          ExecuteJobCmd executeJobCmd = new ExecuteJobCmd(jobId);
+          executeJobCmd.execute(environment);
+        }
+        
+        if (command !=  null) {
+          command.execute(environment);
+        }
+        
+        handleAfterExecutionSynchronizations();
+        
+      } catch (Exception e) {
+        standardTransaction.setRollbackOnly();
+        this.exception = e;
+        
+      } finally {
+        
+        try {
+          standardTransaction.complete();
+        } catch (Exception e) {
+          this.exception = e;
+        }
+        
+      }
+      environment.close();
+    }
+    
+    /**
+     * Executes all synchronizations that must be executed before the job is executed
+     */
+    private void handleBeforeExecutionSynchronizations() {
+      for (CommandExecutionSynchronization synchronization : synchronizations) {
+        synchronization.beforeExecution();
+      }
+    }
+    
+    /**
+     * Executes all synchronizations that must be executed when the job is executed
+     */
+    private void handleAfterExecutionSynchronizations() {
+      for (CommandExecutionSynchronization synchronization : synchronizations) {
+        synchronization.afterExecution();
+      }
+    }
+    
+    /**
+     * Unit tests that use this class can use this method to synchronize
+     * when the job just has been executed.
+     * 
+     * @param blockJobExecutor If true, the jobExecutor will be halted
+     * when leaving the synchronisation point
+     */
+    public void waitUntilExecutionFinished(boolean blockJobExecutor) {
+      if (afterExecutionBarrier != null) {
+        try {
+          threadBlocked = blockJobExecutor;
+          afterExecutionBarrier.await();
+        } catch (InterruptedException e) {
+          e.printStackTrace();
+        } catch (BrokenBarrierException e) {
+          e.printStackTrace();
+        }
+      }
+    }
+    
+    public SynchronizableCommandExecutor synchroniseAfterExecution() {
+      if (isAlive()) {
+        throw new RuntimeException("Cannot set synchronization point once the thread has been started");
+      }
+      
+      if (afterExecutionBarrier == null ) {
+        setSyncPointForAfterExecution(new CyclicBarrier(2));
+      } else {
+        setSyncPointForAfterExecution(new CyclicBarrier(afterExecutionBarrier.getParties() + 1));
+      }
+      
+      setSyncPointForAfterExecution(afterExecutionBarrier);
+      
+      return this;
+    }
+    
+    public SynchronizableCommandExecutor synchroniseAfterExecution(SynchronizableCommandExecutor otherExecutor) {
+      if (this.isAlive() || otherExecutor.isAlive()) {
+        throw new RuntimeException("Cannot set synchronization point once the thread has been started");
+      }
+      
+      if (executorsSyncedAfterExecution == null) {
+        executorsSyncedAfterExecution = new ArrayList<SynchronizableCommandExecutor>();
+      }
+      executorsSyncedAfterExecution.add(otherExecutor);
+      
+      int threadsInvolved = 0;
+      if (afterExecutionBarrier != null) {
+        threadsInvolved += afterExecutionBarrier.getParties();
+      } else {
+        threadsInvolved++;
+      }
+      
+      if (otherExecutor.afterExecutionBarrier != null) {
+        threadsInvolved += otherExecutor.afterExecutionBarrier.getParties();
+      } else {
+        threadsInvolved++;
+      }
+      
+      setSyncPointForAfterExecution(new CyclicBarrier(threadsInvolved));
+      
+      return this; 
+    }
+    
+    private void setSyncPointForAfterExecution(CyclicBarrier syncpoint) {
+      this.afterExecutionBarrier = syncpoint;
+      if (executorsSyncedAfterExecution == null) {
+        executorsSyncedAfterExecution = new ArrayList<SynchronizableCommandExecutor>();
+      }
+      for (SynchronizableCommandExecutor executor : executorsSyncedAfterExecution) {
+        executor.afterExecutionBarrier = this.afterExecutionBarrier;
+      }
+    }
+    
+    public SynchronizableCommandExecutor synchroniseBeforeExecution() {
+      if (isAlive()) {
+        throw new RuntimeException("Cannot set synchronization point once the JobExecutorEmulator has been started");
+      }
+      
+      if (beforeExecutionBarrier == null ) {
+        beforeExecutionBarrier = new CyclicBarrier(2);
+      } else {
+        beforeExecutionBarrier = new CyclicBarrier(beforeExecutionBarrier.getParties() + 1);
+      }
+      
+      return this;
+    }
+    
+    /**
+     * Helper method: check if the flag 'threadBlocked' has been raised.
+     * If so, this thread will block until it is notified again.
+     */
+    private void blockIfNeeded() {
+      if (threadBlocked) {
+        synchronized (this) {
+          try {
+            threadBlocked = false;
+            wait();
+          } catch (InterruptedException e) {
+            e.printStackTrace();
+          }
+        }
+      }
+    }
+    
+    /**
+     * Unit tests can use this method to proceed a halted JobExecutorEmulator.
+     * (ie this means that the wait() was called on this thread in the past).
+     */
+    public void goOn() {
+      synchronized (this) {
+          notify();
+      };
+    }
+    
+    /**
+     * Adds a custom synchronization to the JobExecutorEmulator.
+     */
+    public void addSynchronization(CommandExecutionSynchronization synchronization) {
+      synchronizations.add(synchronization);
+    }
+    
+    /* GETTERS AND SETTERS */
+    
+    public Exception getException() {
+      return exception;
+    }
+    
+    public boolean isBlockThread() {
+      return threadBlocked;
+    }
+
+    public void setBlockThread(boolean blockThread) {
+      this.threadBlocked = blockThread;
+    }
+    
+    public void setAfterExecutionBarrier(CyclicBarrier afterExecutionBarrier) {
+      this.afterExecutionBarrier = afterExecutionBarrier;
+    }
+
+    public void setBeforeExecutionBarrier(CyclicBarrier beforeExecutionBarrier) {
+      this.beforeExecutionBarrier = beforeExecutionBarrier;
+    }
+
+    /**
+     * Default synchronization, executed by all threads.
+     * The default logic will synchronize at every sync point (ie barrier) 
+     * which is not null and will check if any external caller has raised
+     * the 'threadBlocked' flag.
+     */
+    private class DefaultSynchronization extends CommandExecutionSynchronization {
+      
+      public void afterExecution() {
+      
+      if (afterExecutionBarrier != null) {
+        try {
+          afterExecutionBarrier.await();
+          blockIfNeeded();
+        } catch (InterruptedException e) {
+          e.printStackTrace();
+        } catch (BrokenBarrierException e) {
+          e.printStackTrace();
+        }
+      }
+    }
+
+    public void beforeExecution() {
+      
+      if (beforeExecutionBarrier != null) {
+        try {
+          beforeExecutionBarrier.await();
+          blockIfNeeded();
+        } catch (InterruptedException e) {
+          e.printStackTrace();
+        } catch (BrokenBarrierException e) {
+          e.printStackTrace();
+        }
+      }
+    }
+
+  }
+
+}

Modified: jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.cfg.xml	2010-07-18 06:00:34 UTC (rev 6507)
+++ jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.cfg.xml	2010-07-18 07:00:28 UTC (rev 6508)
@@ -5,29 +5,36 @@
   <import resource="jbpm.default.cfg.xml" />
   <import resource="jbpm.businesscalendar.cfg.xml" />
   <import resource="jbpm.jpdl.cfg.xml" />
-  
-  <!-- we need to remove the retry interceptor, so we cant use the default 
+
+  <!-- retry-interceptor needs to be out, so do not use the default
   <import resource="jbpm.tx.hibernate.cfg.xml" />
   -->
-  
+
   <process-engine-context>
-    <command-service>
+    <command-service name="txRequiredCommandService">
+      <skip-interceptor />
       <environment-interceptor />
       <standard-transaction-interceptor />
     </command-service>
+
+    <command-service name="newTxRequiredCommandService">
+      <environment-interceptor policy="requiresNew" />
+      <standard-transaction-interceptor />
+    </command-service>
+
+    <hibernate-configuration>
+      <cfg resource="jbpm.hibernate.cfg.xml" />
+    </hibernate-configuration>
+
+    <hibernate-session-factory />
   </process-engine-context>
 
   <transaction-context>
     <transaction />
     <hibernate-session />
   </transaction-context>
-  
 
-	<!--
-		In the concurrency tests, we'll emulate the job executor to have full
-		control on when syncing occurs 
-		
-		<import resource="jbpm.jobexecutor.cfg.xml" />
-	-->
-
+  <!-- in concurrency tests, emulate the job executor to control syncing
+  <import resource="jbpm.jobexecutor.cfg.xml" />
+  -->
 </jbpm-configuration>

Modified: jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml	2010-07-18 06:00:34 UTC (rev 6507)
+++ jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml	2010-07-18 07:00:28 UTC (rev 6508)
@@ -1,45 +1,34 @@
 <?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/Hibernate Configuration DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 
 <hibernate-configuration>
   <session-factory>
+    <!-- H2 config -->
+    <property name="hibernate.connection.driver_class">org.h2.Driver</property>
+    <property name="hibernate.connection.url">jdbc:h2:mem:.;MVCC=TRUE</property>
+    <property name="hibernate.connection.username">sa</property>
+    <property name="hibernate.connection.password">sa</property>
+    <property name="hibernate.default_schema">PUBLIC</property>
+    <property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
 
-	<!--
-		<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>
-	-->
+    <!-- PostgreSQL config
+    <property name="hibernate.connection.driver_class">org.h2.Driver</property>
+    <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/jbpm</property>
+    <property name="hibernate.connection.username">postgres</property>
+    <property name="hibernate.connection.password">postgres</property>
+    <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+    -->
 
-	<!-- H2 config -->
-	<property name="hibernate.connection.driver_class">org.h2.Driver</property>
-	<property name="hibernate.connection.url">jdbc:h2:mem:.;MVCC=TRUE</property>
-	<property name="hibernate.connection.username">sa</property>
-	<property name="hibernate.connection.password">sa</property>
-	<property name="hibernate.default_schema">PUBLIC</property>
-	<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
-    
-	
-	<!-- POSTGRES config 
-	<property name="hibernate.connection.driver_class">org.h2.Driver</property>
-	<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/jbpm</property>
-	<property name="hibernate.connection.username">postgres</property>
-	<property name="hibernate.connection.password">postgres</property>
-	<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> 
-	-->                                   
-     
     <property name="hibernate.hbm2ddl.auto">create-drop</property>
-	<property name="hibernate.format_sql">true</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" />
-     
+    <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>

Modified: jbpm4/trunk/modules/test-upgrade/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-upgrade/pom.xml	2010-07-18 06:00:34 UTC (rev 6507)
+++ jbpm4/trunk/modules/test-upgrade/pom.xml	2010-07-18 07:00:28 UTC (rev 6508)
@@ -11,10 +11,10 @@
 
 <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>
 
   <!-- Module Info -->
-  <modelVersion>4.0.0</modelVersion>
-  <name>jBPM 4 - TEST-UPGRADE</name>
+  <name>jBPM 4 - Test Upgrade</name>
   <groupId>org.jbpm.jbpm4</groupId>
   <artifactId>jbpm-test-upgrade</artifactId>
   <packaging>jar</packaging>

Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml	2010-07-18 06:00:34 UTC (rev 6507)
+++ jbpm4/trunk/pom.xml	2010-07-18 07:00:28 UTC (rev 6508)
@@ -531,9 +531,6 @@
         <module>modules/db</module>
         <module>modules/distro</module>
       </modules>
-      <properties>
-        <skipTests>true</skipTests>
-      </properties>
       <build>
         <plugins>
           <plugin>
@@ -739,17 +736,31 @@
         <module>modules/devguide</module>
         <module>modules/userguide</module>
         <!-- distro -->
+        <module>modules/db</module>
+        <module>modules/distro</module>
         <module>modules/enterprise</module>
         <module>modules/jboss</module>
-        <module>modules/db</module>
-        <module>modules/distro</module>
         <!-- integration/enterprise -->
         <module>modules/test-cactus</module>
         <module>modules/test-enterprise/test-enterprise-ejb</module>
         <module>modules/test-enterprise/test-enterprise-suite</module>
         <!-- load -->
         <module>modules/test-load</module>
+        <!-- varia -->
+        <module>modules/test-cfg</module>
+        <module>modules/test-concurrent</module>
+        <module>modules/test-upgrade</module>
       </modules>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <skipTests>true</skipTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
   </profiles>
 </project>



More information about the jbpm-commits mailing list