[jbpm-commits] JBoss JBPM SVN: r2402 - in jbpm4/branches/tdiesler: modules/api and 12 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Sep 26 12:01:53 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-09-26 12:01:53 -0400 (Fri, 26 Sep 2008)
New Revision: 2402
Added:
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestCase.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java
jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.Configuration
Removed:
jbpm4/branches/tdiesler/modules/impl/scripts/
jbpm4/branches/tdiesler/modules/impl/src/main/java/org/jboss/
jbpm4/branches/tdiesler/modules/impl/src/main/resources/hibernate.cfg.hsqldb.xml
jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.ProcessEngineProvider
jbpm4/branches/tdiesler/modules/impl/src/test/java/org/
jbpm4/branches/tdiesler/modules/impl/src/test/resources/jbpm-beans.xml
Modified:
jbpm4/branches/tdiesler/.project
jbpm4/branches/tdiesler/modules/api/pom.xml
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineRegistry.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java
jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java
jbpm4/branches/tdiesler/modules/cts/pom.xml
jbpm4/branches/tdiesler/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java
jbpm4/branches/tdiesler/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml
jbpm4/branches/tdiesler/modules/cts/src/test/resources/log4j.xml
jbpm4/branches/tdiesler/modules/impl/pom.xml
jbpm4/branches/tdiesler/pom.xml
Log:
More work on MC config
Modified: jbpm4/branches/tdiesler/.project
===================================================================
--- jbpm4/branches/tdiesler/.project 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/.project 2008-09-26 16:01:53 UTC (rev 2402)
@@ -6,18 +6,12 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Modified: jbpm4/branches/tdiesler/modules/api/pom.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/api/pom.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/pom.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -17,13 +17,11 @@
<artifactId>jbpm-api</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-SNAPSHOT</version>
-
<!-- Parent -->
<parent>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/Configuration.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/Configuration.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -33,10 +33,14 @@
public interface Configuration
{
/**
- * Get the ProcessEngine for this configuration
- * <p/>
- *
+ * Create a new instance of ProcessEngine for this configuration
* @return The configured instance of a process engine
*/
ProcessEngine getProcessEngine();
+
+ /**
+ * Get a ProcessEngine with a given name from this configuration
+ * @return The configured instance of a process engine
+ */
+ ProcessEngine getProcessEngine(String engineName);
}
\ No newline at end of file
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/MicrocontainerConfiguration.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -28,7 +28,6 @@
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;
/**
@@ -44,50 +43,64 @@
/** 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)
+ // Everything gets deployed through one deployer
+ private static EmbeddedBeansDeployer beansDeployer = new EmbeddedBeansDeployer();
+
+ public void deployDefaultConfig()
{
- this.cfgURL = cfgURL;
+ URL cfgURL = getDefaultConfigURL();
+ beansDeployer.deploy(cfgURL);
}
- public MicrocontainerConfiguration()
+ public void undeployDefaultConfig()
{
- cfgURL = Thread.currentThread().getContextClassLoader().getResource(JBPM_ENGINE_CONFIG);
- if (cfgURL == null)
- throw new IllegalStateException("Cannot find resource: " + JBPM_ENGINE_CONFIG);
+ URL cfgURL = getDefaultConfigURL();
+ beansDeployer.undeploy(cfgURL);
}
+ public void deployBeansConfig(URL cfgURL)
+ {
+ beansDeployer.deploy(cfgURL);
+ }
+
+ public void undeployBeansConfig(URL cfgURL)
+ {
+ beansDeployer.undeploy(cfgURL);
+ }
+
/**
- * Get the ProcessEngine from this provider
- *
+ * Get the default ProcessEngine from this configuration
* @return The configured instance of a process engine
*/
- @SuppressWarnings("deprecation")
public ProcessEngine getProcessEngine()
{
- KernelRegistryEntry entry = null;
+ return getProcessEngine(BEAN_NAME);
+ }
+
+ /**
+ * Get a ProcessEngine with a given name from this configuration
+ * @return The configured instance of a process engine
+ */
+ @SuppressWarnings("deprecation")
+ public ProcessEngine getProcessEngine(String beanName)
+ {
Kernel kernel = KernelLocator.getKernel();
if (kernel == null)
{
- new EmbeddedBeansDeployer().deploy(cfgURL);
+ deployDefaultConfig();
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);
- }
- }
-
+
+ KernelRegistryEntry entry = kernel.getRegistry().getEntry(beanName);
ProcessEngine engine = (ProcessEngine)entry.getTarget();
return engine;
}
+
+ private URL getDefaultConfigURL()
+ {
+ URL cfgURL = Thread.currentThread().getContextClassLoader().getResource(JBPM_ENGINE_CONFIG);
+ if (cfgURL == null)
+ throw new IllegalStateException("Cannot find resource: " + JBPM_ENGINE_CONFIG);
+ return cfgURL;
+ }
}
\ No newline at end of file
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -33,17 +33,15 @@
import org.slf4j.LoggerFactory;
/**
- * The process engine is an agregator of various service objects used by the BPM engine.
- * <p/>
- * A ProcessEngine is always created via one of the available {@link Configuration} objects. Every implementation of the
- * API has one default {@link Configuration} which is configured via a resource file with the fully qualified class name
- * of {@link Configuration}.
- * <p/>
- * The API natively supports {@link MicrocontainerConfiguration}. To create and register a ProcessEngine explicitly, you
- * would do
+ * The process engine is an agregator of various service objects used by the BPM engine. <p/> A ProcessEngine is always
+ * created via one of the available {@link Configuration} objects. Every implementation of the API has one default
+ * {@link Configuration} which is configured via a resource file with the fully qualified class name of
+ * {@link Configuration}. <p/> The API natively supports {@link MicrocontainerConfiguration}. To create and register a
+ * ProcessEngine explicitly, you would do
+ *
* <pre>
- * ProcessEngine engine = new MicrocontainerConfiguration(cfgURL).getProcessEngine();
- * ProcessEngineRegistry.registerProcessEngine(engine);
+ * ProcessEngine engine = new MicrocontainerConfiguration(cfgURL).getProcessEngine();
+ * ProcessEngineRegistry.registerProcessEngine(engine);
* </pre>
*
* @author thomas.diesler at jboss.com
@@ -124,6 +122,13 @@
this.name = name;
}
+ /**
+ * Do a shutdown of this
+ */
+ public void shutdownProcessEngine()
+ {
+ }
+
private static void loadDefaultEngine()
{
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
@@ -131,24 +136,24 @@
if (instream == null)
throw new IllegalStateException("Cannot find resource: " + Configuration.class.getName());
- Configuration configuration = null;
+ Configuration config;
try
{
BufferedReader br = new BufferedReader(new InputStreamReader(instream));
String configurationClassName = br.readLine();
Class<?> configurationClass = ctxLoader.loadClass(configurationClassName);
- configuration = (Configuration)configurationClass.newInstance();
+ config = (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);
+ ProcessEngine engine = config.getProcessEngine();
+ if (engine == null)
+ throw new IllegalStateException("Cannot obtain engine from configuration: " + config);
- ProcessEngineRegistry.registerProcessEngine(pe);
+ ProcessEngineRegistry.registerProcessEngine(engine);
}
@Override
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineRegistry.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineRegistry.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/ProcessEngineRegistry.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -61,13 +61,13 @@
* Register a ProcessEngine
* @throws IllegalStateException If a ProcessEngine with that name is already registered
*/
- public static void registerProcessEngine(ProcessEngine pe)
+ public static void registerProcessEngine(ProcessEngine engine)
{
- if (engineRegistry.get(pe.getName()) != null)
- throw new IllegalStateException("Process engine already regitered: " + pe.getName());
+ if (engineRegistry.get(engine.getName()) != null)
+ throw new IllegalStateException("Process engine already registered: " + engine.getName());
- log.debug("Register: " + pe);
- engineRegistry.put(pe.getName(), pe);
+ log.debug("Register: " + engine);
+ engineRegistry.put(engine.getName(), engine);
}
/**
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -73,8 +73,6 @@
public void deploy(URL url)
{
log.debug("deploy: " + url);
-
- // Deploy the beans
try
{
deployer.deploy(url);
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -40,13 +40,13 @@
{
// 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());
+ log.debug("### START " + getLongName());
super.setUp();
}
@@ -54,16 +54,21 @@
protected void tearDown() throws Exception
{
super.tearDown();
- log.debug("tearDown: " + getClass().getName());
+ log.debug("### END " + getLongName());
}
-
- public URL getResourceURL(String resource) throws MalformedURLException
+
+ protected URL getResourceURL(String resource) throws MalformedURLException
{
return delegate.getResourceURL(resource);
}
- public File getResourceFile(String resource)
+ protected File getResourceFile(String resource)
{
return delegate.getResourceFile(resource);
}
+
+ protected String getLongName()
+ {
+ return getClass().getName() + "." + getName();
+ }
}
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/CTSTestSetup.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -22,7 +22,7 @@
package org.jbpm.api.test;
import junit.extensions.TestSetup;
-import junit.framework.Test;
+import junit.framework.TestSuite;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -37,9 +37,24 @@
{
// Provide logging
final Logger log = LoggerFactory.getLogger(CTSTestSetup.class);
-
- public CTSTestSetup(Test test)
+
+ public CTSTestSetup(Class<?> testCase)
{
- super(test);
+ super(new TestSuite(testCase));
}
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ log.debug("### START SETUP " + getTest());
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ log.debug("### END SETUP " + getTest());
+ }
+
}
Added: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestCase.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestCase.java (rev 0)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestCase.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -0,0 +1,49 @@
+/*
+ * 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 org.jbpm.api.client.ProcessEngine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A CTS test case
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class ConfigurationTestCase extends CTSTestCase
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(ConfigurationTestCase.class);
+
+ // By convention a this test case should have a setup that deployes
+ // and registers an engine named CTSTestEngine
+ protected ProcessEngine getProcessEngine()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine(ConfigurationTestSetup.CTS_TEST_ENGINE);
+ if (engine == null)
+ throw new IllegalStateException("Cannot obtain process engine: " + ConfigurationTestSetup.CTS_TEST_ENGINE);
+
+ return engine;
+ }
+}
Property changes on: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java (rev 0)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -0,0 +1,77 @@
+/*
+ * 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.net.URL;
+
+import org.jbpm.api.client.MicrocontainerConfiguration;
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.ProcessEngineRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A CTS test setup
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Sep-2008
+ */
+public class ConfigurationTestSetup extends CTSTestSetup
+{
+ public static final String CTS_TEST_ENGINE = "CTSTestEngine";
+
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(ConfigurationTestSetup.class);
+
+ private CTSTestHelper helper = new CTSTestHelper();
+ private String beansConfig;
+
+
+ public ConfigurationTestSetup(Class<?> testCase, String beansConfig)
+ {
+ super(testCase);
+ this.beansConfig = beansConfig;
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ // deploy the provided beans config and register the engine
+ URL cfgURL = helper.getResourceURL(beansConfig);
+ MicrocontainerConfiguration configuration = new MicrocontainerConfiguration();
+ configuration.deployBeansConfig(cfgURL);
+ ProcessEngine engine = configuration.getProcessEngine(CTS_TEST_ENGINE);
+ ProcessEngineRegistry.registerProcessEngine(engine);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ URL cfgURL = helper.getResourceURL(beansConfig);
+ ProcessEngineRegistry.unregisterProcessEngine(CTS_TEST_ENGINE);
+ new MicrocontainerConfiguration().undeployBeansConfig(cfgURL);
+ super.tearDown();
+ }
+
+}
Property changes on: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java
===================================================================
--- jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestSetup.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -32,9 +32,6 @@
import javax.management.MBeanServerConnection;
import javax.naming.NamingException;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
/**
* A test setup that deploys/undeploys archives
*
@@ -49,21 +46,10 @@
public IntegrationTestSetup(Class<?> testClass, String archiveList)
{
- super(new TestSuite(testClass));
+ super(testClass);
getArchiveArray(archiveList);
}
- public IntegrationTestSetup(Test test, String archiveList)
- {
- super(test);
- getArchiveArray(archiveList);
- }
-
- public IntegrationTestSetup(Test test)
- {
- super(test);
- }
-
public File getArchiveFile(String archive)
{
return delegate.getArchiveFile(archive);
Modified: jbpm4/branches/tdiesler/modules/cts/pom.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/cts/pom.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/cts/pom.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -17,13 +17,11 @@
<artifactId>jbpm-cts</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-SNAPSHOT</version>
-
<!-- Parent -->
<parent>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -71,8 +69,8 @@
<dependencies>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-pvm</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <artifactId>jbpm-impl</artifactId>
+ <version>${version}</version>
</dependency>
</dependencies>
</profile>
@@ -86,14 +84,14 @@
<activation>
<property>
<name>impl</name>
- <value>ri</value>
+ <value>pvm</value>
</property>
</activation>
<dependencies>
<dependency>
- <groupId>org.jbpm.spec</groupId>
- <artifactId>jbpm-spec-ri</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-pvm</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</profile>
Modified: jbpm4/branches/tdiesler/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java
===================================================================
--- jbpm4/branches/tdiesler/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java 2008-09-26 16:01:53 UTC (rev 2402)
@@ -54,28 +54,41 @@
{
// create an engine from an MC config
URL cfgURL = getResourceURL("cts/processengine/test-cfg-beans.xml");
- ProcessEngine engineOne = new MicrocontainerConfiguration(cfgURL).getProcessEngine();
- assertNotNull("ProcessEngine not null", engineOne);
+
+ String engineName = "CTSTestEngine";
+ MicrocontainerConfiguration configuration = new MicrocontainerConfiguration();
+ configuration.deployBeansConfig(cfgURL);
+
+ try
+ {
+ ProcessEngine engineOne = configuration.getProcessEngine(engineName);
+ assertNotNull("ProcessEngine not null", engineOne);
+ assertEquals("ProcessEngine name", engineName, engineOne.getName());
- // the engine is not automatically registered
- ProcessEngine engineTwo = ProcessEngine.getProcessEngine("mock engine");
- assertNull("ProcessEngine null", engineTwo);
+ // the engine is not automatically registered
+ ProcessEngine engineTwo = ProcessEngine.getProcessEngine(engineName);
+ assertNull("ProcessEngine null", engineTwo);
- // register the engine and do the lockup again
- ProcessEngineRegistry.registerProcessEngine(engineOne);
- engineTwo = ProcessEngine.getProcessEngine("mock engine");
- assertNotNull("ProcessEngine not null", engineTwo);
- assertSame("ProcessEngine same", engineOne, engineTwo);
+ // register the engine and do the lockup again
+ ProcessEngineRegistry.registerProcessEngine(engineOne);
+ engineTwo = ProcessEngine.getProcessEngine(engineName);
+ assertNotNull("ProcessEngine not null", engineTwo);
+ assertSame("ProcessEngine same", engineOne, engineTwo);
- // Try to register the engine twice
- try
- {
- ProcessEngineRegistry.registerProcessEngine(engineTwo);
- fail("Expceted IllegalStateException");
+ // Try to register the engine twice
+ try
+ {
+ ProcessEngineRegistry.registerProcessEngine(engineTwo);
+ fail("Expceted IllegalStateException");
+ }
+ catch (IllegalStateException e)
+ {
+ // expected
+ }
}
- catch (IllegalStateException e)
+ finally
{
- // expected
+ configuration.undeployBeansConfig(cfgURL);
}
}
}
Modified: jbpm4/branches/tdiesler/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/cts/src/test/resources/cts/processengine/test-cfg-beans.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -1,11 +1,8 @@
<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 name="CTSTestEngine" class="org.jbpm.test.cts.processengine.MockProcessEngine">
+ <property name="name">CTSTestEngine</property>
</bean>
</deployment>
Modified: jbpm4/branches/tdiesler/modules/cts/src/test/resources/log4j.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/cts/src/test/resources/log4j.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/cts/src/test/resources/log4j.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -12,7 +12,7 @@
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
</layout>
</appender>
Modified: jbpm4/branches/tdiesler/modules/impl/pom.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/impl/pom.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/impl/pom.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -14,23 +14,57 @@
<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 Spec - RI</name>
- <groupId>org.jbpm.spec</groupId>
- <artifactId>jbpm-spec-ri</artifactId>
+ <name>JBoss jBPM4 - Impl</name>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-impl</artifactId>
<packaging>jar</packaging>
+
<!-- Parent -->
<parent>
- <groupId>org.jbpm.spec</groupId>
- <artifactId>jbpm-spec</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<!-- Properties -->
<properties>
+ <hibernate.version>3.2.6.ga</hibernate.version>
+ <hibernate.annotations.version>3.3.1.GA</hibernate.annotations.version>
+ <hibernate.validator.version>3.0.0.ga</hibernate.validator.version>
+ <hsqldb.version>1.8.0.7</hsqldb.version>
+ <mysql.connector.version>5.1.6</mysql.connector.version>
</properties>
+ <!-- DependencyManagement -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>${hibernate.annotations.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>${hibernate.validator.version}</version>
+ </dependency>
+
+ <!-- Database Driver Versions -->
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>${mysql.connector.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<!-- Dependencies -->
<dependencies>
<dependency>
@@ -39,15 +73,6 @@
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.jbpm.spec</groupId>
- <artifactId>jbpm-spec-api</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.mvel</groupId>
- <artifactId>mvel</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</dependency>
Deleted: jbpm4/branches/tdiesler/modules/impl/src/main/resources/hibernate.cfg.hsqldb.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/impl/src/main/resources/hibernate.cfg.hsqldb.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/impl/src/main/resources/hibernate.cfg.hsqldb.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -1,32 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
-"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
-"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
-
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
-
- <!-- ################################### -->
- <!-- # common settings # -->
- <!-- ################################### -->
-
- <!-- Automatic schema creation -->
- <property name="hibernate.hbm2ddl.auto">create-drop</property>
-
- <!-- Simple memory-only cache -->
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- logging properties -->
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
-
- </session-factory>
-</hibernate-configuration>
Added: jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.Configuration
===================================================================
--- jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.Configuration (rev 0)
+++ jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.Configuration 2008-09-26 16:01:53 UTC (rev 2402)
@@ -0,0 +1 @@
+org.jbpm.api.client.MicrocontainerConfiguration
\ No newline at end of file
Deleted: jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.ProcessEngineProvider
===================================================================
--- jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.ProcessEngineProvider 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/impl/src/main/resources/org.jbpm.api.client.ProcessEngineProvider 2008-09-26 16:01:53 UTC (rev 2402)
@@ -1 +0,0 @@
-org.jbpm.api.client.MicrocontainerEngineProvider
\ No newline at end of file
Deleted: jbpm4/branches/tdiesler/modules/impl/src/test/resources/jbpm-beans.xml
===================================================================
--- jbpm4/branches/tdiesler/modules/impl/src/test/resources/jbpm-beans.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/modules/impl/src/test/resources/jbpm-beans.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -1,48 +0,0 @@
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- The KernelLocator -->
- <bean name="KernelLocator" class="org.jboss.kernel.plugins.util.KernelLocator"/>
-
- <!-- The Builder Factories -->
- <bean name="jBPMProcessBuilderFactory" class="org.jboss.bpm.ri.model.impl.ProcessBuilderFactoryImpl"/>
- <bean name="jBPMMessageBuilderFactory" class="org.jboss.bpm.ri.model.impl.MessageBuilderFactoryImpl"/>
-
- <!-- The ProcessEngine -->
- <bean name="jBPMProcessEngine" class="org.jboss.bpm.ri.client.ProcessEngineImpl">
- <property name="processManager"><inject bean="jBPMProcessManager"/></property>
- <property name="executionManager"><inject bean="jBPMExecutionManager"/></property>
- <property name="signalManager"><inject bean="jBPMSignalManager"/></property>
- <property name="messageManager"><inject bean="jBPMMessageManager"/></property>
- </bean>
-
- <!-- The Managers -->
- <bean name="jBPMExecutionManager" class="org.jboss.bpm.ri.client.ExecutionManagerImpl"/>
- <bean name="jBPMSignalManager" class="org.jboss.bpm.ri.client.SignalManagerImpl"/>
- <bean name="jBPMMessageManager" class="org.jboss.bpm.ri.client.MessageManagerImpl"/>
-
- <!-- The ProcessManager -->
- <bean name="jBPMProcessManager" class="org.jboss.bpm.ri.client.ProcessManagerImpl">
- <property name="dialectRegistry"><inject bean="jBPMDialectRegistry"/></property>
- <property name="persistenceService"><inject bean="jBPMPersistenceService"/></property>
- <property name="dialectHandlers">
- <map keyClass="java.lang.String" valueClass="org.jboss.bpm.client.DialectHandler">
- </map>
- </property>
- </bean>
-
- <!-- The DialectRegistry -->
- <bean name="jBPMDialectRegistry" class="org.jboss.bpm.client.DialectRegistry">
- <property name="registry">
- <map keyClass="java.net.URI" valueClass="java.lang.String">
- <entry><key>urn:bpm.jboss:pdl-0.1</key><value>api10</value></entry>
- <entry><key>urn:jbpm.org:jpdl-3.2</key><value>jpdl32</value></entry>
- <entry><key>http://stp.eclipse.org/bpmn</key><value>stp</value></entry>
- <entry><key>http://www.wfmc.org/2008/XPDL2.1</key><value>xpdl21</value></entry>
- </map>
- </property>
- </bean>
-
- <!-- The PersistenceService -->
- <bean name="jBPMPersistenceService" class="org.jboss.bpm.ri.client.HibernatePersistenceService"/>
-
-</deployment>
Modified: jbpm4/branches/tdiesler/pom.xml
===================================================================
--- jbpm4/branches/tdiesler/pom.xml 2008-09-26 15:25:41 UTC (rev 2401)
+++ jbpm4/branches/tdiesler/pom.xml 2008-09-26 16:01:53 UTC (rev 2402)
@@ -22,7 +22,7 @@
<artifactId>jbpm</artifactId>
<packaging>pom</packaging>
- <version>4.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -34,7 +34,7 @@
<!-- Modules -->
<modules>
<module>modules/api</module>
- <module>modules/ri</module>
+ <module>modules/impl</module>
<module>modules/cts</module>
</modules>
More information about the jbpm-commits
mailing list