[jbpm-commits] JBoss JBPM SVN: r2370 - in jbpm4/trunk: modules/api and 9 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Sep 25 00:23:02 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-09-25 00:23:02 -0400 (Thu, 25 Sep 2008)
New Revision: 2370

Added:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestHelper.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java
   jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/MockProcessEngine.java
   jbpm4/trunk/modules/cts/src/test/resources/cts/
   jbpm4/trunk/modules/cts/src/test/resources/cts/processengine/
   jbpm4/trunk/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java
Removed:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerEngineProvider.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineProvider.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineProvider.java
Modified:
   jbpm4/trunk/modules/api/pom.xml
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java
   jbpm4/trunk/modules/cts/pom.xml
   jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java
   jbpm4/trunk/pom.xml
Log:
Use SLF4J

Modified: jbpm4/trunk/modules/api/pom.xml
===================================================================
--- jbpm4/trunk/modules/api/pom.xml	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/pom.xml	2008-09-25 04:23:02 UTC (rev 2370)
@@ -29,7 +29,6 @@
 
   <!-- Properties -->
   <properties>
-    <commons.logging.version>1.1.1</commons.logging.version>
     <jboss.microcontainer.version>2.0.0.Beta15</jboss.microcontainer.version>
   </properties>
   
@@ -37,11 +36,6 @@
   <dependencyManagement>
     <dependencies>
       <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>${commons.logging.version}</version>
-      </dependency>
-      <dependency>
         <groupId>org.jboss.microcontainer</groupId>
         <artifactId>jboss-kernel</artifactId>
         <version>${jboss.microcontainer.version}</version>
@@ -52,8 +46,8 @@
   <!-- Dependencies -->
   <dependencies>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
       <groupId>org.jboss.microcontainer</groupId>

Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,42 @@
+/*
+ * 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.api.client;
+
+// $Id$
+
+/**
+ * The Configuration provides a ProcessEngine through a given 
+ * configuration method
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public abstract class Configuration
+{
+  /**
+   * Get the ProcessEngine for this configuration
+   * <p/>
+   * 
+   * @return The configured instance of a process engine
+   */
+  public abstract ProcessEngine getProcessEngine();
+}
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,93 @@
+/*
+ * 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.api.client;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException;
+import org.jbpm.api.client.internal.EmbeddedBeansDeployer;
+
+/**
+ * The ProcessEngineProvider provides a ProcessEngine through a given configuration method
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public class MicrocontainerConfiguration extends Configuration
+{
+  /** The process engine bean name - jBPMEngine */
+  public static final String BEAN_NAME = "jBPMProcessEngine";
+  /** The default bean config: jbpm-cfg-beans.xml */
+  public static final String JBPM_ENGINE_CONFIG = "jbpm-cfg-beans.xml";
+
+  private URL cfgURL;
+  
+  public MicrocontainerConfiguration(URL cfgURL)
+  {
+    this.cfgURL = cfgURL; 
+  }
+
+  public MicrocontainerConfiguration()
+  {
+    cfgURL = Thread.currentThread().getContextClassLoader().getResource(JBPM_ENGINE_CONFIG);
+    if (cfgURL == null)
+      throw new IllegalStateException("Cannot find resource: " + JBPM_ENGINE_CONFIG);
+  }
+
+  /**
+   * Get the ProcessEngine from this provider
+   * 
+   * @return The configured instance of a process engine
+   */
+  @SuppressWarnings("deprecation")
+  public ProcessEngine getProcessEngine()
+  {
+    KernelRegistryEntry entry = null;
+    Kernel kernel = KernelLocator.getKernel();
+    if (kernel == null)
+    {
+      new EmbeddedBeansDeployer().deploy(cfgURL);
+      kernel = KernelLocator.getKernel();
+      entry = kernel.getRegistry().getEntry(BEAN_NAME);
+    }
+    else
+    {
+      try
+      {
+        entry = kernel.getRegistry().getEntry(BEAN_NAME);
+      }
+      catch (KernelRegistryEntryNotFoundException ex)
+      {
+        new EmbeddedBeansDeployer().deploy(cfgURL);
+        entry = kernel.getRegistry().getEntry(BEAN_NAME);
+      }
+    }
+
+    ProcessEngine engine = (ProcessEngine)entry.getTarget();
+    return engine;
+  }
+}
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerEngineProvider.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerEngineProvider.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerEngineProvider.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -1,88 +0,0 @@
-/*
- * 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.api.client;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.util.KernelLocator;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException;
-import org.jbpm.api.client.internal.EmbeddedBeansDeployer;
-
-/**
- * The ProcessEngineProvider provides a ProcessEngine through a given configuration method
- * 
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public class MicrocontainerEngineProvider implements ProcessEngineProvider
-{
-  /** The process engine bean name - jBPMEngine */
-  public static final String BEAN_NAME = "jBPMProcessEngine";
-  /** The default bean config: jbpm-cfg-beans.xml */
-  public static final String JBPM_ENGINE_CONFIG = "jbpm-cfg-beans.xml";
-
-  /**
-   * Get the ProcessEngine from this provider
-   * 
-   * @return The configured instance of a process engine
-   */
-  @SuppressWarnings("deprecation")
-  public ProcessEngine getProcessEngine()
-  {
-    KernelRegistryEntry entry = null;
-    Kernel kernel = KernelLocator.getKernel();
-    if (kernel == null)
-    {
-      deployEngineConfiguration();
-      kernel = KernelLocator.getKernel();
-      entry = kernel.getRegistry().getEntry(BEAN_NAME);
-    }
-    else
-    {
-      try
-      {
-        entry = kernel.getRegistry().getEntry(BEAN_NAME);
-      }
-      catch (KernelRegistryEntryNotFoundException ex)
-      {
-        deployEngineConfiguration();
-        entry = kernel.getRegistry().getEntry(BEAN_NAME);
-      }
-    }
-
-    ProcessEngine engine = (ProcessEngine)entry.getTarget();
-    return engine;
-  }
-
-  private void deployEngineConfiguration()
-  {
-    URL url = Thread.currentThread().getContextClassLoader().getResource(JBPM_ENGINE_CONFIG);
-    if (url == null)
-      throw new IllegalStateException("Cannot find resource: " + JBPM_ENGINE_CONFIG);
-
-    new EmbeddedBeansDeployer().deploy(url);
-  }
-}
\ No newline at end of file

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -21,11 +21,16 @@
  */
 package org.jbpm.api.client;
 
+//$Id$
+
 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
 
-// $Id$
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The process engine is an agregator of various manger objects used by the BPM engine
@@ -35,8 +40,13 @@
  */
 public class ProcessEngine
 {
-  // The provider for the process engine
-  private static ProcessEngineProvider engineProvider;
+  // Provide logging
+  final static Logger log = LoggerFactory.getLogger(ProcessEngine.class);
+
+  // The process engine registry
+  private static Map<String, ProcessEngine> engineRegistry = new HashMap<String, ProcessEngine>();
+  // The name of this engine
+  private String name = "default";
   // Flag to indicate that the Engine is shutting down
   private boolean prepareForShutdown;
 
@@ -46,42 +56,70 @@
   }
 
   /**
-   * Locate the ProcessEngine instance shared by all clients.
+   * Get registered the default ProcessEngine
    * 
    * @return The configured instance of a process engine
    */
-  public static ProcessEngine getInstance()
+  public static ProcessEngine getProcessEngine()
   {
-    if (engineProvider == null)
+    return getProcessEngine(null);
+  }
+
+  /**
+   * Get a registered ProcessEngine
+   * 
+   * @return null, if there is no registered by this name
+   */
+  public static ProcessEngine getProcessEngine(String name)
+  {
+    if (engineRegistry.size() == 0)
+      loadDefaultEngine();
+    
+    ProcessEngine pe = null; 
+    if (name == null && engineRegistry.size() == 1)
     {
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-      InputStream instream = ctxLoader.getResourceAsStream(ProcessEngineProvider.class.getName());
-      if (instream == null)
-        throw new IllegalStateException("Cannot find resource: " + ProcessEngineProvider.class.getName());
-      
-      try
-      {
-        BufferedReader br = new BufferedReader(new InputStreamReader(instream));
-        String engineProviderName = br.readLine();
-        Class<?> engineProviderClass = ctxLoader.loadClass(engineProviderName);
-        engineProvider = (ProcessEngineProvider)engineProviderClass.newInstance();
-      }
-      catch (Exception ex)
-      {
-        throw new IllegalStateException("Cannot obtain engine provider", ex);
-      }
+      pe = engineRegistry.values().iterator().next();
     }
-    
-    ProcessEngine pe = engineProvider.getProcessEngine();
+    else
+    {
+      pe = engineRegistry.get(name);
+    }
     return pe;
   }
+  
+  /**
+   * Get the name of this engine
+   */
+  public String getName()
+  {
+    return name;
+  }
 
+  // Set the name of this engine
+  protected void setName(String name)
+  {
+    this.name = name;
+  }
+  
+  public static void registerProcessEngine(ProcessEngine pe)
+  {
+    log.debug("Register: " + pe);
+    engineRegistry.put(pe.getName(), pe);
+  }
+
+  public static ProcessEngine unregisterProcessEngine(String name)
+  {
+    ProcessEngine pe = engineRegistry.remove(name);
+    log.debug("Unregister: " + name + "=" + pe);
+    return pe;
+  }
+
   /**
    * Prepare the engine for shutdown. During shutdown the creation of new processes is disallowed.
    */
   public void prepareForShutdown()
   {
-    // log.debug("prepareForShutdown");
+    log.debug("prepareForShutdown");
     prepareForShutdown = true;
   }
 
@@ -98,7 +136,40 @@
    */
   public void cancelShutdown()
   {
-    // log.debug("cancelShutdown");
+    log.debug("cancelShutdown");
     prepareForShutdown = false;
   }
+  
+  private static void loadDefaultEngine()
+  {
+    ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+    InputStream instream = ctxLoader.getResourceAsStream(Configuration.class.getName());
+    if (instream == null)
+      throw new IllegalStateException("Cannot find resource: " + Configuration.class.getName());
+    
+    Configuration configuration = null;
+    try
+    {
+      BufferedReader br = new BufferedReader(new InputStreamReader(instream));
+      String configurationClassName = br.readLine();
+      Class<?> configurationClass = ctxLoader.loadClass(configurationClassName);
+      configuration = (Configuration)configurationClass.newInstance();
+    }
+    catch (Exception ex)
+    {
+      throw new IllegalStateException("Cannot obtain configuration", ex);
+    }
+    
+    ProcessEngine pe = configuration.getProcessEngine();
+    if (pe == null)
+      throw new IllegalStateException("Cannot obtain engine from configuration: " + configuration);
+    
+    registerProcessEngine(pe);
+  }
+
+  @Override
+  public String toString()
+  {
+    return "ProcessEngine[name=" + name + ",class=" + getClass().getName() + "]";
+  }
 }
\ No newline at end of file

Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineProvider.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineProvider.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineProvider.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -1,41 +0,0 @@
-/*
- * 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.api.client;
-
-// $Id$
-
-/**
- * The ProcessEngineProvider provides a ProcessEngine through a given 
- * configuration method
- * 
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public interface ProcessEngineProvider
-{
-  /**
-   * Get the ProcessEngine from this provider
-   * 
-   * @return The configured instance of a process engine
-   */
-  public ProcessEngine getProcessEngine();
-}
\ No newline at end of file

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -25,12 +25,13 @@
 
 import java.net.URL;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
 import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
 import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jbpm.api.test.CTSTestSetup;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Boostrap the Microcontainer
@@ -40,8 +41,8 @@
  */
 public class EmbeddedBeansDeployer extends BasicBootstrap
 {
-  // provide logging
-  private static final Log log = LogFactory.getLog(EmbeddedBeansDeployer.class);
+  // Provide logging
+  final Logger log = LoggerFactory.getLogger(CTSTestSetup.class);
 
   private Kernel kernel;
   private BasicXMLDeployer deployer;

Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,69 @@
+/*
+ * 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.api.test;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A CTS test case
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class CTSTestCase extends TestCase
+{
+  // Provide logging
+  final Logger log = LoggerFactory.getLogger(CTSTestCase.class);
+  
+  private CTSTestHelper delegate = new CTSTestHelper();
+  
+  @Override
+  protected void setUp() throws Exception
+  {
+    log.debug("setUp: " + getClass().getName());
+    super.setUp();
+  }
+
+  @Override
+  protected void tearDown() throws Exception
+  {
+    super.tearDown();
+    log.debug("tearDown: " + getClass().getName());
+  }
+  
+  public URL getResourceURL(String resource) throws MalformedURLException
+  {
+    return delegate.getResourceURL(resource);
+  }
+
+  public File getResourceFile(String resource)
+  {
+    return delegate.getResourceFile(resource);
+  }
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestHelper.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestHelper.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestHelper.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,67 @@
+/*
+ * 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.api.test;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * An CTS test helper
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class CTSTestHelper
+{
+  private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+
+  private static String testResourcesDir;
+
+  /** Try to discover the URL for the test resource */
+  public URL getResourceURL(String resource) throws MalformedURLException
+  {
+    return getResourceFile(resource).toURI().toURL();
+  }
+
+  /** Try to discover the File for the test resource */
+  public File getResourceFile(String resource)
+  {
+    File file = new File(resource);
+    if (file.exists())
+      return file;
+
+    file = new File(getTestResourcesDir() + "/" + resource);
+    if (file.exists())
+      return file;
+
+    throw new IllegalArgumentException("Cannot obtain '" + getTestResourcesDir() + "/" + resource + "'");
+  }
+
+  public String getTestResourcesDir()
+  {
+    if (testResourcesDir == null)
+      testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY, "target/test-classes");
+
+    return testResourcesDir;
+  }
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestHelper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -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.api.test;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A CTS test setup
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class CTSTestSetup extends TestSetup
+{
+  // Provide logging
+  final Logger log = LoggerFactory.getLogger(CTSTestSetup.class);
+  
+  public CTSTestSetup(Test test)
+  {
+    super(test);
+  }
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -36,14 +36,12 @@
  * @author Thomas.Diesler at jboss.org
  * @since 14-Oct-2004
  */
-public class IntegrationTestHelper
+public class IntegrationTestHelper extends CTSTestHelper
 {
    private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
-   private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
 
    private static MBeanServerConnection server;
    private static String testArchiveDir;
-   private static String testResourcesDir;
 
    /** Deploy the given archive
     */
@@ -62,7 +60,7 @@
    }
 
    @SuppressWarnings("unchecked")
-   public static MBeanServerConnection getServer()
+   public MBeanServerConnection getServer()
    {
       if (server == null)
       {
@@ -127,19 +125,11 @@
       throw new IllegalArgumentException("Cannot obtain '" + getTestResourcesDir() + "/" + resource + "'");
    }
 
-   public static String getTestArchiveDir()
+   public String getTestArchiveDir()
    {
       if (testArchiveDir == null)
          testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY, "target/test-libs");
 
       return testArchiveDir;
    }
-
-   public static String getTestResourcesDir()
-   {
-      if (testResourcesDir == null)
-         testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY, "target/test-resource");
-
-      return testResourcesDir;
-   }
 }

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -32,128 +32,132 @@
 import javax.management.MBeanServerConnection;
 import javax.naming.NamingException;
 
-import junit.extensions.TestSetup;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
 /**
  * A test setup that deploys/undeploys archives
- *
+ * 
  * @author Thomas.Diesler at jboss.org
  * @since 14-Oct-2004
  */
-public class IntegrationTestSetup extends TestSetup
+public class IntegrationTestSetup extends CTSTestSetup
 {
-   private IntegrationTestHelper delegate = new IntegrationTestHelper();
-   private String[] archives = new String[0];
-   private ClassLoader originalClassLoader;
+  private IntegrationTestHelper delegate = new IntegrationTestHelper();
+  private String[] archives = new String[0];
+  private ClassLoader originalClassLoader;
 
-   public IntegrationTestSetup(Class<?> testClass, String archiveList)
-   {
-      super(new TestSuite(testClass));
-      getArchiveArray(archiveList);
-   }
+  public IntegrationTestSetup(Class<?> testClass, String archiveList)
+  {
+    super(new TestSuite(testClass));
+    getArchiveArray(archiveList);
+  }
 
-   public IntegrationTestSetup(Test test, String archiveList)
-   {
-      super(test);
-      getArchiveArray(archiveList);
-   }
+  public IntegrationTestSetup(Test test, String archiveList)
+  {
+    super(test);
+    getArchiveArray(archiveList);
+  }
 
-   public IntegrationTestSetup(Test test)
-   {
-      super(test);
-   }
+  public IntegrationTestSetup(Test test)
+  {
+    super(test);
+  }
 
-   public File getArchiveFile(String archive)
-   {
-      return delegate.getArchiveFile(archive);
-   }
+  public File getArchiveFile(String archive)
+  {
+    return delegate.getArchiveFile(archive);
+  }
 
-   public URL getArchiveURL(String archive) throws MalformedURLException
-   {
-      return delegate.getArchiveFile(archive).toURI().toURL();
-   }
+  public URL getArchiveURL(String archive) throws MalformedURLException
+  {
+    return delegate.getArchiveFile(archive).toURI().toURL();
+  }
 
-   public File getResourceFile(String resource)
-   {
-      return delegate.getResourceFile(resource);
-   }
+  public File getResourceFile(String resource)
+  {
+    return delegate.getResourceFile(resource);
+  }
 
-   public URL getResourceURL(String resource) throws MalformedURLException
-   {
-      return delegate.getResourceFile(resource).toURI().toURL();
-   }
+  public URL getResourceURL(String resource) throws MalformedURLException
+  {
+    return delegate.getResourceFile(resource).toURI().toURL();
+  }
 
-   private void getArchiveArray(String archiveList)
-   {
-      if (archiveList != null)
-      {
-         StringTokenizer st = new StringTokenizer(archiveList, ", ");
-         archives = new String[st.countTokens()];
+  private void getArchiveArray(String archiveList)
+  {
+    if (archiveList != null)
+    {
+      StringTokenizer st = new StringTokenizer(archiveList, ", ");
+      archives = new String[st.countTokens()];
 
-         for (int i = 0; i < archives.length; i++)
-            archives[i] = st.nextToken();
-      }
-   }
+      for (int i = 0; i < archives.length; i++)
+        archives[i] = st.nextToken();
+    }
+  }
 
-   protected void setUp() throws Exception
-   {
-      List<URL> clientJars = new ArrayList<URL>();
-      for (int i = 0; i < archives.length; i++)
+  @Override
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    
+    List<URL> clientJars = new ArrayList<URL>();
+    for (int i = 0; i < archives.length; i++)
+    {
+      String archive = archives[i];
+      try
       {
-         String archive = archives[i];
-         try
-         {
-            delegate.deploy(archive);
-         }
-         catch (Exception ex)
-         {
-            ex.printStackTrace();
-            delegate.undeploy(archive);
-         }
-
-         if (archive.endsWith("-client.jar"))
-         {
-            URL archiveURL = getArchiveURL(archive);
-            clientJars.add(archiveURL);
-         }
+        delegate.deploy(archive);
       }
+      catch (Exception ex)
+      {
+        ex.printStackTrace();
+        delegate.undeploy(archive);
+      }
 
-      ClassLoader parent = Thread.currentThread().getContextClassLoader();
-      originalClassLoader = parent;
-      
-      // add client jars to the class loader
-      if (!clientJars.isEmpty())
+      if (archive.endsWith("-client.jar"))
       {
-         URL[] urls = new URL[clientJars.size()];
-         for (int i = 0; i < clientJars.size(); i++)
-         {
-            urls[i] = clientJars.get(i);
-         }
-         URLClassLoader cl = new URLClassLoader(urls, parent);
-         Thread.currentThread().setContextClassLoader(cl);
+        URL archiveURL = getArchiveURL(archive);
+        clientJars.add(archiveURL);
       }
-   }
+    }
 
-   protected void tearDown() throws Exception
-   {
-      try
+    ClassLoader parent = Thread.currentThread().getContextClassLoader();
+    originalClassLoader = parent;
+
+    // add client jars to the class loader
+    if (!clientJars.isEmpty())
+    {
+      URL[] urls = new URL[clientJars.size()];
+      for (int i = 0; i < clientJars.size(); i++)
       {
-         for (int i = 0; i < archives.length; i++)
-         {
-            String archive = archives[archives.length - i - 1];
-            delegate.undeploy(archive);
-         }
+        urls[i] = clientJars.get(i);
       }
-      finally
+      URLClassLoader cl = new URLClassLoader(urls, parent);
+      Thread.currentThread().setContextClassLoader(cl);
+    }
+  }
+
+  @Override
+  protected void tearDown() throws Exception
+  {
+    try
+    {
+      for (int i = 0; i < archives.length; i++)
       {
-         Thread.currentThread().setContextClassLoader(originalClassLoader);
+        String archive = archives[archives.length - i - 1];
+        delegate.undeploy(archive);
       }
-   }
+    }
+    finally
+    {
+      Thread.currentThread().setContextClassLoader(originalClassLoader);
+    }
+    super.tearDown();
+  }
 
-   public MBeanServerConnection getServer() throws NamingException
-   {
-      return IntegrationTestHelper.getServer();
-   }
+  public MBeanServerConnection getServer() throws NamingException
+  {
+    return delegate.getServer();
+  }
 }

Modified: jbpm4/trunk/modules/cts/pom.xml
===================================================================
--- jbpm4/trunk/modules/cts/pom.xml	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/cts/pom.xml	2008-09-25 04:23:02 UTC (rev 2370)
@@ -38,6 +38,14 @@
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
     </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+    </dependency>
   </dependencies>
   
   <!-- Plugins -->

Added: jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/MockProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/MockProcessEngine.java	                        (rev 0)
+++ jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/MockProcessEngine.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,41 @@
+/*
+ * 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.cts.processengine;
+
+// $Id$
+
+import org.jbpm.api.client.ProcessEngine;
+
+/**
+ * A mock ProcessEngine
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Sep-2008
+ */
+public class MockProcessEngine extends ProcessEngine
+{
+  @Override
+  protected void setName(String name)
+  {
+    super.setName(name);
+  }
+}


Property changes on: jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/MockProcessEngine.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java
===================================================================
--- jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -23,9 +23,11 @@
 
 // $Id$
 
-import junit.framework.TestCase;
+import java.net.URL;
 
+import org.jbpm.api.client.MicrocontainerConfiguration;
 import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test the ProcessEngine
@@ -33,11 +35,29 @@
  * @author thomas.diesler at jboss.com
  * @since 24-Sep-2008
  */
-public class ProcessEngineTest extends TestCase
+public class ProcessEngineTest extends CTSTestCase
 {
-  public void testGetProcessEngine() throws Exception
+  public void testDefaultProcessEngine() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getInstance();
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
     assertNotNull("ProcessEngine not null", engine);
   }
+  
+  public void testUnregisteredProcessEngine() throws Exception
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine("bogus");
+    assertNull("ProcessEngine null", engine);
+  }
+  
+  public void testMicrocontainerConfiguration() throws Exception
+  {
+    URL cfgURL = getResourceURL("cts/processengine/test-cfg-beans.xml");
+    ProcessEngine engineOne = new MicrocontainerConfiguration(cfgURL).getProcessEngine();
+    assertNotNull("ProcessEngine not null", engineOne);
+    
+    ProcessEngine engineTwo = ProcessEngine.getProcessEngine("mock engine");
+    assertNotNull("ProcessEngine not null", engineTwo);
+    
+    assertSame("ProcessEngine same", engineOne, engineTwo);
+  }
 }

Added: jbpm4/trunk/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml
===================================================================
--- jbpm4/trunk/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml	                        (rev 0)
+++ jbpm4/trunk/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,11 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ 
+  <!-- The KernelLocator -->
+  <bean name="KernelLocator" class="org.jboss.kernel.plugins.util.KernelLocator"/>
+  
+  <!-- The ProcessEngine -->
+  <bean name="jBPMProcessEngine" class="org.jbpm.test.cts.processengine.MockProcessEngine">
+    <property name="name">mock engine</property>
+  </bean>
+  
+</deployment>


Property changes on: jbpm4/trunk/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -0,0 +1,41 @@
+/*
+ * 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.pvm;
+
+//$Id$
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.Configuration;
+
+/**
+ * A mock process engine configuration 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Sep-2008
+ */
+public class MockProcessEngineConfiguration extends Configuration
+{
+  public ProcessEngine getProcessEngine()
+  {
+    return new ProcessEngineImpl();
+  }
+}


Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineConfiguration.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineProvider.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineProvider.java	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/MockProcessEngineProvider.java	2008-09-25 04:23:02 UTC (rev 2370)
@@ -1,41 +0,0 @@
-/*
- * 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.pvm;
-
-//$Id$
-
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.client.ProcessEngineProvider;
-
-/**
- * A mock process engine provider 
- * 
- * @author thomas.diesler at jboss.com
- * @since 24-Sep-2008
- */
-public class MockProcessEngineProvider implements ProcessEngineProvider
-{
-  public ProcessEngine getProcessEngine()
-  {
-    return new ProcessEngineImpl();
-  }
-}

Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml	2008-09-24 22:51:43 UTC (rev 2369)
+++ jbpm4/trunk/pom.xml	2008-09-25 04:23:02 UTC (rev 2370)
@@ -51,8 +51,9 @@
     <jsr233.version>2.0.3</jsr233.version>
     <juel.version>2.1.0</juel.version>
     <log4j.version>1.2.14</log4j.version>
+    <servlet-api.version>2.5</servlet-api.version>
+    <slf4j.version>1.5.3</slf4j.version>
     <spring.version>2.5.4</spring.version>
-    <servlet-api.version>2.5</servlet-api.version>
   </properties>
   
   <!-- DependencyManagement -->
@@ -63,7 +64,34 @@
         <artifactId>jbpm-api</artifactId>
         <version>${jbpm.api.version}</version>
       </dependency>
+
+      <!-- Please sort by groupid -->      
       <dependency>
+        <groupId>cactus</groupId>
+        <artifactId>cactus</artifactId>
+        <version>${cactus.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.cenqua.clover</groupId>
+        <artifactId>clover</artifactId>
+        <version>${clover.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>hsqldb</groupId>
+        <artifactId>hsqldb</artifactId>
+        <version>${hsqldb.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>javax.servlet</groupId>
+        <artifactId>servlet-api</artifactId>
+        <version>${servlet-api.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>jboss</groupId>
+        <artifactId>jboss-j2ee</artifactId>
+        <version>${jboss.j2ee.version}</version>
+      </dependency>
+      <dependency>
         <groupId>juel</groupId>
         <artifactId>juel</artifactId>
         <version>${juel.version}</version>
@@ -79,44 +107,24 @@
         <version>${juel.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.hibernate</groupId>
-        <artifactId>hibernate</artifactId>
-        <version>${hibernate.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>hsqldb</groupId>
-        <artifactId>hsqldb</artifactId>
-        <version>${hsqldb.version}</version>
-      </dependency>
-      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>${junit.version}</version>
       </dependency>
       <dependency>
-        <groupId>com.cenqua.clover</groupId>
-        <artifactId>clover</artifactId>
-        <version>${clover.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>servlet-api</artifactId>
-        <version>${servlet-api.version}</version>
-      </dependency>
-      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>${log4j.version}</version>
       </dependency>
       <dependency>
-        <groupId>jboss</groupId>
-        <artifactId>jboss-j2ee</artifactId>
-        <version>${jboss.j2ee.version}</version>
+        <groupId>org.hibernate</groupId>
+        <artifactId>hibernate</artifactId>
+        <version>${hibernate.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring</artifactId>
-        <version>${spring.version}</version>
+        <groupId>org.jboss.seam</groupId>
+        <artifactId>jboss-seam</artifactId>
+        <version>${jboss.seam.version}</version>
       </dependency>
       <dependency>
         <groupId>org.livetribe</groupId>
@@ -124,15 +132,20 @@
         <version>${jsr233.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.jboss.seam</groupId>
-        <artifactId>jboss-seam</artifactId>
-        <version>${jboss.seam.version}</version>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+        <version>${slf4j.version}</version>
       </dependency>
       <dependency>
-        <groupId>cactus</groupId>
-        <artifactId>cactus</artifactId>
-        <version>${cactus.version}</version>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-log4j12</artifactId>
+        <version>${slf4j.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring</artifactId>
+        <version>${spring.version}</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 




More information about the jbpm-commits mailing list