JBoss JBPM SVN: r4178 - in jbpm3: tags and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-03-06 13:51:52 -0500 (Fri, 06 Mar 2009)
New Revision: 4178
Added:
jbpm3/tags/jbpm-3.2.6.GA/
Removed:
jbpm3/branches/jbpm-3.2.6.GA/
Log:
Release jbpm-3.2.6.GA
Copied: jbpm3/tags/jbpm-3.2.6.GA (from rev 4177, jbpm3/branches/jbpm-3.2.6.GA)
17 years, 2 months
JBoss JBPM SVN: r4177 - in jbpm4/branches/hbraun/modules: distro/src/main/resources/installer and 10 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-06 13:29:34 -0500 (Fri, 06 Mar 2009)
New Revision: 4177
Added:
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java
Modified:
jbpm4/branches/hbraun/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml
jbpm4/branches/hbraun/modules/distro/src/main/resources/installer/install-definition.xml
jbpm4/branches/hbraun/modules/enterprise/src/main/resources/jbpm.cfg.xml
jbpm4/branches/hbraun/modules/integration/jboss5/integration-jboss5.iml
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java
jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java
Log:
AS 5 deployer, work in progress
Modified: jbpm4/branches/hbraun/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml
===================================================================
--- jbpm4/branches/hbraun/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml 2009-03-06 18:29:34 UTC (rev 4177)
@@ -72,6 +72,7 @@
<binding class="org.jbpm.pvm.internal.wire.binding.CheckProcessBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.CheckProblemsBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.SaveBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.VersionPolicySaveBinding" />
<!-- interceptors -->
<binding class="org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding" />
Modified: jbpm4/branches/hbraun/modules/distro/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm4/branches/hbraun/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-06 18:29:34 UTC (rev 4177)
@@ -175,8 +175,7 @@
<!--fileset dir="@{deploy.artifacts.dir}/resources/jbpm-integration-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="bpm-process-deployer.xml" />
</fileset-->
- <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
- <include name="jbpm-log.jar" />
+ <fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm-pvm.jar" />
<include name="jbpm-jpdl.jar" />
<include name="jbpm-task.jar" />
@@ -227,6 +226,7 @@
condition="isJBoss422">
<include name="jbpm-api.jar"/>
<include name="jbpm-spi.jar"/>
+ <include name="jbpm-log.jar" />
</fileset>
@@ -242,6 +242,7 @@
condition="isJBoss423">
<include name="jbpm-api.jar"/>
<include name="jbpm-spi.jar"/>
+ <include name="jbpm-log.jar" />
</fileset>
<!--
@@ -257,6 +258,7 @@
<include name="jbpm-api.jar"/>
<include name="jbpm-spi.jar"/>
<include name="jbpm-jboss5.jar"/>
+ <include name="jbpm-log.jar" />
</fileset>
<fileset dir="@{deploy.artifacts.dir}/resources/jbpm-jboss5-config/META-INF"
targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/jbpm.deployer"
Modified: jbpm4/branches/hbraun/modules/enterprise/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/branches/hbraun/modules/enterprise/src/main/resources/jbpm.cfg.xml 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/enterprise/src/main/resources/jbpm.cfg.xml 2009-03-06 18:29:34 UTC (rev 4177)
@@ -15,19 +15,25 @@
<file extension=".jpdl.xml" type="jpdl" />
</assign-file-type>
<parse-jpdl />
- <check-process />
+ <!--check-process / Covered by VersionTimestampPolicy -->
<check-problems />
- <save />
+ <save policy="org.jbpm.pvm.internal.wire.binding.VersionTimestampPolicy"/>
</deployer-manager>
<process-service />
<execution-service />
<management-service />
- <ejb-local-command-service>
+ <!--ejb-local-command-service>
<home jndi-name="java:jbpm/CommandExecutor"/>
- </ejb-local-command-service>
+ </ejb-local-command-service-->
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <standard-transaction-interceptor />
+ </command-service>
+
<hibernate-configuration resource="hibernate.cfg.xml"/>
<hibernate-session-factory />
@@ -47,7 +53,8 @@
</process-engine-context>
<transaction-context>
- <hibernate-session current="true" />
+ <hibernate-session />
+ <transaction />
<pvm-db-session />
<job-db-session />
<ejb-timer-session />
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/integration-jboss5.iml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/integration-jboss5.iml 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/integration-jboss5.iml 2009-03-06 18:29:34 UTC (rev 4177)
@@ -10,6 +10,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="integration-spi" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:compile">
<CLASSES>
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -21,22 +21,33 @@
*/
package org.jbpm.integration.jboss5;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-
+import org.jbpm.Deployment;
+import org.jbpm.ProcessService;
+import org.jbpm.env.Environment;
+import org.jbpm.env.EnvironmentFactory;
import org.jbpm.integration.spi.JBPMService;
-import org.jbpm.integration.util.KernelAwareSPIFactory;
+import org.jbpm.integration.spi.JBPMServiceLocator;
+import org.jbpm.internal.log.Log;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+import javax.transaction.SystemException;
+import java.io.File;
+
/**
* Deploys JBPM processes and associates a classloader.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class JBPMDeployer extends AbstractSimpleVFSRealDeployer<JBPMDeploymentMetaData>
{
+ private static final Log log = Log.getLog(JBPMDeployer.class.getName());
+
public JBPMDeployer()
{
super(JBPMDeploymentMetaData.class);
@@ -45,19 +56,59 @@
public void deploy(VFSDeploymentUnit unit, JBPMDeploymentMetaData deployment)
throws DeploymentException
{
- System.out.println("*** JBPM : Working on " + deployment);
+ JBPMService jbpmService = JBPMServiceLocator.locateService();
- JBPMService jbpmService = new KernelAwareSPIFactory().getKernelProvidedSPI(
- "org.jbpm:service=ProcessEngine", JBPMService.class
- );
+ // associate classloader
+ deployment.setClassloader(unit.getClassLoader());
- System.out.println("*** JBPM Service: " + jbpmService);
+ log.info("Deploy " + deployment);
+
+ UserTransaction tx = null;
+
+ try
+ {
+
+ InitialContext ctx = new InitialContext();
+ tx = (UserTransaction)ctx.lookup("UserTransaction");
+
+ tx.begin();
+
+
+ // deploy to process engine
+ ProcessService processService = jbpmService.getProcessEngine().getProcessService();
+ String pathToDeployment = unit.getTopLevel().getRoot().toURL().getPath();
+ File deploymentFile = new File(pathToDeployment);
+
+ Deployment dpl = processService.createDeployment()
+ .addUrl(deployment.getProcessDescriptor())
+ .addObject("jbpmdeployer.deploymentArtifact.timestamp", Long.valueOf(deploymentFile.lastModified()))
+ .addObject("jbpmdeployer.deploymentArtifact.location", deployment.getDeploymentUnit());
+
+ dpl.deploy();
+
+ tx.commit();
+
+ }
+ catch(Exception e)
+ {
+ if(tx!=null)
+ {
+ try
+ {
+ tx.rollback();
+ }
+ catch (SystemException e1) {}
+ }
+
+ throw new DeploymentException("Failed to deploy process", e);
+ }
+
}
public void undeploy(DeploymentUnit unit, JBPMDeploymentMetaData deployment)
{
- System.out.println("*** JBPM : Undeploy "+deployment);
-
+ log.info("Undeploy "+deployment);
+
super.undeploy(unit, deployment);
}
}
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -21,9 +21,49 @@
*/
package org.jbpm.integration.jboss5;
+import java.net.URL;
+
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class JBPMDeploymentMetaData
{
+ private URL deploymentUnit;
+ private URL processDescriptor;
+ private ClassLoader classloader;
+
+ public void setProcessDescriptor(URL processDescriptor)
+ {
+ this.processDescriptor = processDescriptor;
+ }
+
+ public void setDeploymentUnit(URL deploymentUnit)
+ {
+ this.deploymentUnit = deploymentUnit;
+ }
+
+ public void setClassloader(ClassLoader classloader)
+ {
+ this.classloader = classloader;
+ }
+
+ public URL getDeploymentUnit()
+ {
+ return deploymentUnit;
+ }
+
+ public URL getProcessDescriptor()
+ {
+ return processDescriptor;
+ }
+
+ public ClassLoader getClassloader()
+ {
+ return classloader;
+ }
+
+ public String toString()
+ {
+ return "JBPMDeploymentMetaData {unit="+deploymentUnit+", jpdl="+processDescriptor+", cl="+classloader+"}";
+ }
}
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -23,7 +23,10 @@
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.spi.DeploymentException;
import org.jboss.virtual.VirtualFile;
+import org.jbpm.internal.log.Log;
/**
* Prepares {@link org.jbpm.integration.jboss5.JBPMDeploymentMetaData}
@@ -32,18 +35,24 @@
*/
public class JBPMMetaDataDeployer extends AbstractVFSParsingDeployer<JBPMDeploymentMetaData>
{
+ private static final Log log = Log.getLog(JBPMMetaDataDeployer.class.getName());
public JBPMMetaDataDeployer()
{
super(JBPMDeploymentMetaData.class);
}
- protected JBPMDeploymentMetaData parse(VFSDeploymentUnit unit, VirtualFile file, JBPMDeploymentMetaData root) throws Exception
+ protected JBPMDeploymentMetaData parse(
+ VFSDeploymentUnit unit,
+ VirtualFile file, JBPMDeploymentMetaData root) throws Exception
{
- System.out.println("*** JBPM: Creating structure from " + file);
+ log.debug("Creating structure from " + file);
- // TODO: implement parsing logic
+ JBPMDeploymentMetaData md = new JBPMDeploymentMetaData();
+
+ md.setProcessDescriptor(file.toURL());
+ md.setDeploymentUnit(unit.getRoot().toURL());
- return new JBPMDeploymentMetaData();
+ return md;
}
}
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -24,24 +24,27 @@
import org.jbpm.integration.spi.JBPMService;
import org.jbpm.ProcessEngine;
import org.jbpm.Configuration;
+import org.jbpm.internal.log.Log;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class JBPMServiceImpl implements JBPMService
{
+ private static final Log log = Log.getLog(JBPMServiceImpl.class.getName());
+
private ProcessEngine processEngine;
public void start()
{
this.processEngine = new Configuration().buildProcessEngine();
- System.out.println("** JBPMService started: " + this.processEngine);
+ log.info("JBPMService started: " + this.processEngine);
}
public void stop()
{
this.processEngine = null;
- System.out.println("** JBPMService stopped");
+ log.info("JBPMService stopped");
}
public ProcessEngine getProcessEngine()
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml 2009-03-06 18:29:34 UTC (rev 4177)
@@ -5,29 +5,39 @@
<!--
Locate the single instance of the kernel
-->
- <bean name="org.jbpm:service=KernelLocator" class="org.jbpm.integration.util.KernelLocator">
- <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ <bean name="org.jbpm:service=KernelLocator"
+ class="org.jbpm.integration.util.KernelLocator">
+ <property name="kernel">
+ <inject bean="jboss.kernel:service=Kernel" />
+ </property>
</bean>
<!--
The JBPM Meta Data Deployer
-->
- <bean name="org.jbpm:service=MetaDataDeployer" class="org.jbpm.integration.jboss5.JBPMMetaDataDeployer">
- <property name="suffix">jpdl.xml</property>
- <property name="jarExtension">par</property>
+ <bean name="org.jbpm:service=MetaDataDeployer"
+ class="org.jbpm.integration.jboss5.JBPMMetaDataDeployer">
+
+ <property name="suffix">.jpdl.xml</property>
+
+ <!-- Move to .par when https://jira.jboss.org/jira/browse/JBAS-6274 is done -->
+ <property name="jarExtension">jar</property>
+
<property name="allowMultipleFiles">true</property>
<!-- files the deployer can process -->
<!--property name="names">
<set elementClass="java.lang.String">
- <value>processdefinition.xml</value>
+ <value>process.jpdl.xml</value>
</set>
</property-->
+
</bean>
<!--
The actual jBPM Deployer
-->
- <bean name="org.jbpm:service=Deployer" class="org.jbpm.integration.jboss5.JBPMDeployer"/>
-
+ <bean name="org.jbpm:service=Deployer"
+ class="org.jbpm.integration.jboss5.JBPMDeployer"/>
+
</deployment>
\ No newline at end of file
Added: jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java (rev 0)
+++ jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.integration.spi;
+
+import org.jbpm.integration.util.KernelAwareSPIFactory;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPMServiceLocator
+{
+ public static JBPMService locateService()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ "org.jbpm:service=ProcessEngine", JBPMService.class
+ );
+ }
+
+ public static JBPMService locateService(String configName)
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ "org.jbpm:service=ProcessEngine,name="+configName, JBPMService.class
+ );
+ }
+}
Modified: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -23,12 +23,15 @@
import java.io.InputStream;
import java.io.Serializable;
+import java.util.Map;
import org.jbpm.ProcessDefinition;
import org.jbpm.env.Environment;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.svc.DeploymentImpl;
+import org.jbpm.pvm.internal.wire.binding.SavePolicy;
+import org.jbpm.pvm.internal.wire.binding.PolicyEvaluation;
import org.jbpm.session.PvmDbSession;
/**
@@ -38,7 +41,20 @@
private static final long serialVersionUID = 1L;
private static Log log = Log.getLog(SaveDeployer.class.getName());
-
+
+ // the default policy does always apply
+ private final static SavePolicy DEFAULT_POLICY = new SavePolicy()
+ {
+ public PolicyEvaluation evaluate(DeploymentImpl deployment)
+ {
+ PolicyEvaluation evaluation = new PolicyEvaluation();
+ evaluation.setDoesApply(true);
+ return evaluation;
+ }
+ };
+
+ private SavePolicy policy = DEFAULT_POLICY;
+
public void deploy(DeploymentImpl deployment) {
Environment environment = Environment.getCurrent();
if (environment==null) {
@@ -46,21 +62,30 @@
return;
}
+ // if the save policy doesn't apply,
+ // then the process will not be stored
+ PolicyEvaluation policyEvaluation = policy.evaluate(deployment);
+ if( policyEvaluation.doesApply() == false)
+ {
+ log.info("Policy " + policy.getClass().getName() + " doesn't appply. Skip deployment.");
+ return;
+ }
+
PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
if (pvmDbSession==null) {
deployment.addProblem(PvmDbSession.class.getName()+" is required in the environment by "+getClass().getName());
return;
}
-
+
ProcessDefinitionImpl lastProcessDefinition = null;
-
+
boolean deployedProcess = false;
for (String objectName : deployment.getObjectNames()) {
Object object = deployment.getObject(objectName);
if (object instanceof ProcessDefinition) {
deployedProcess = true;
- lastProcessDefinition = (ProcessDefinitionImpl) object;
-
+ lastProcessDefinition = (ProcessDefinitionImpl) object;
+
log.debug("saving process definition "+object);
pvmDbSession.save(object);
}
@@ -70,6 +95,16 @@
for (String fileName : deployment.getFileNames()) {
InputStream inputStream = deployment.getFile(fileName);
lastProcessDefinition.addAttachment(fileName, inputStream);
+
+ // persist policy evaluation results
+ // policies may require this information upon subsequent calls
+ // i.e. redeployment of process definitions
+ Map<String,String> policyEvaluationResults = policyEvaluation.getResults();
+ for(String key : policyEvaluationResults.keySet())
+ {
+ lastProcessDefinition.addAttachment(key, policyEvaluationResults.get(key).getBytes());
+ }
+
}
}
@@ -81,4 +116,9 @@
public String toString() {
return "save";
}
+
+ public void setPolicy(SavePolicy policy)
+ {
+ this.policy = policy;
+ }
}
Modified: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -40,7 +40,8 @@
/**
* @author Tom Baeyens
*/
-public class ProcessDefinitionImpl extends CompositeElementImpl implements OpenProcessDefinition, ClientProcessDefinition {
+public class ProcessDefinitionImpl extends CompositeElementImpl
+ implements OpenProcessDefinition, ClientProcessDefinition {
private static final long serialVersionUID = 1L;
private static final Log log = Log.getLog(ProcessDefinitionImpl.class.getName());
Modified: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -28,8 +28,11 @@
import org.jbpm.pvm.internal.svc.Interceptor;
-/** calls setRollbackOnly on the transaction in the environment
+/**
+ * Calls setRollbackOnly on the transaction in the environment
* in case an exception occurs during execution of the command.
+ * <p>
+ * Models "requires-new" semantic.
*
* @author Tom Baeyens
*/
Added: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java (rev 0)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.internal.wire.binding;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class PolicyEvaluation
+{
+ private boolean doesApply = true;
+ private Map<String, String> results = new HashMap<String,String>();
+
+ public boolean doesApply()
+ {
+ return doesApply;
+ }
+
+ public void setDoesApply(boolean doesApply)
+ {
+ this.doesApply = doesApply;
+ }
+
+ public Map<String, String> getResults()
+ {
+ return results;
+ }
+}
Modified: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -42,6 +42,23 @@
public Object parse(Element element, Parse parse, Parser parser) {
SaveDeployer saveDeployer = new SaveDeployer();
+
+ if (element.hasAttribute("policy")) {
+ String policyClassName = element.getAttribute("policy");
+ SavePolicy policy = null;
+ try
+ {
+ Class<?> policyClass = Thread.currentThread().getContextClassLoader().loadClass(policyClassName);
+ policy = (SavePolicy)policyClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Failed to load policy " +policyClassName, e);
+ }
+
+ saveDeployer.setPolicy(policy);
+ }
+
return new ProvidedObjectDescriptor(saveDeployer);
}
}
Added: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java (rev 0)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.internal.wire.binding;
+
+import org.jbpm.pvm.internal.svc.DeploymentImpl;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface SavePolicy
+{
+ PolicyEvaluation evaluate(DeploymentImpl deployment);
+}
Added: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java (rev 0)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -0,0 +1,151 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.internal.wire.binding;
+
+import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.svc.DeploymentImpl;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.env.Environment;
+import org.jbpm.ProcessService;
+import org.jbpm.ProcessDefinitionQuery;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.client.ClientProcessDefinition;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import java.io.Serializable;
+import java.util.List;
+import java.net.URL;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class VersionTimestampPolicy implements SavePolicy, Serializable
+{
+ private static Log log = Log.getLog(VersionTimestampPolicy.class.getName());
+
+ private static final String DEPLOYER_TIMESTAMP = "jbpmdeployer.deploymentArtifact.timestamp";
+ private static final String DEPLOYER_LOCATION = "jbpmdeployer.deploymentArtifact.location";
+
+ public PolicyEvaluation evaluate(DeploymentImpl deployment)
+ {
+ log.debug("Apply " + this.getClass().getName());
+
+ PolicyEvaluation evaluation = new PolicyEvaluation();
+
+ for (String fileName: deployment.getFileNamesForType("jpdl"))
+ {
+ Document doc = deployment.getDocument(fileName);
+ if(null==doc)
+ throw new IllegalArgumentException("Policy expects JPDL document");
+
+ Element processEl = doc.getDocumentElement();
+ String nameAttribute = XmlUtil.attribute(processEl, "name");
+ String keyAttribute = XmlUtil.attribute(processEl, "key");
+ String versionAttribute = XmlUtil.attribute(processEl, "version");
+
+ // @see JBPMDeployer, it provides the timestamp
+ long currentTimestamp = (Long)deployment.getObject(DEPLOYER_TIMESTAMP);
+ URL deloymentLocation = (URL)deployment.getObject(DEPLOYER_LOCATION);
+
+ // provide evaluation properties
+ evaluation.getResults().put(DEPLOYER_TIMESTAMP, String.valueOf(currentTimestamp));
+ evaluation.getResults().put(DEPLOYER_LOCATION, String.valueOf(deloymentLocation.getPath()));
+
+ // can either be key or name given
+ String identifier = nameAttribute!=null ? nameAttribute : keyAttribute;
+
+ // query exisisting processes
+ ProcessService processService = getEnvironment().get(ProcessService.class);
+ ProcessDefinitionQuery query = processService.createProcessDefinitionQuery();
+ if(nameAttribute!=null)
+ query.nameLike(nameAttribute);
+ else
+ query.keyLike(keyAttribute);
+ List<ProcessDefinition> deployedProcesses = query.execute();
+
+ // apply either version or timestamp policy
+ if(versionAttribute!=null)
+ {
+ log.info("Version driven policy evaluation: process '"+identifier+"', version " +versionAttribute);
+
+ long processVersion = Long.valueOf(versionAttribute);
+ for(ProcessDefinition pd : deployedProcesses)
+ {
+ if(processVersion == pd.getVersion())
+ {
+ // explicit version version match
+ // the process will not be saved
+ evaluation.setDoesApply(false);
+
+ log.info("A process definition '"+identifier+"' with version "+versionAttribute+
+ " does already exist. The process will not be deployed: " + deloymentLocation);
+ break;
+ }
+ }
+ }
+ else
+ {
+ log.info("Timestamp driven policy evaluation: process '"+identifier+"', timestamp " +currentTimestamp);
+
+ for(ProcessDefinition pd : deployedProcesses)
+ {
+
+ byte[] bytes = ((ClientProcessDefinition)pd).getAttachment(DEPLOYER_TIMESTAMP);
+ if(null==bytes)
+ {
+ log.error("Failed to retrieve 'jbpmdeployer.deploymentArtifact.timestamp' from process attachments");
+ continue;
+ }
+
+ String s = new String(bytes);
+ long processTimestamp = Long.valueOf(s);
+
+ if(currentTimestamp <= processTimestamp)
+ {
+ // the timestamp of a given deployment artifact
+ // is less or equal to the already deployed process definition
+ // this prevents redeployments upon AS boot
+ evaluation.setDoesApply(false);
+
+ log.info("The deployment artifact doesn't seem to have changed: '"+deloymentLocation+"'."
+ +" Process "+identifier+" will not be deployed");
+ break;
+ }
+
+ }
+ }
+
+ }
+
+ return evaluation;
+ }
+
+ private Environment getEnvironment()
+ {
+ Environment environment = Environment.getCurrent();
+ if (environment==null)
+ throw new RuntimeException("Failed to access current environment");
+ return environment;
+
+ }
+}
Modified: jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java
===================================================================
--- jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java 2009-03-06 18:28:27 UTC (rev 4176)
+++ jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java 2009-03-06 18:29:34 UTC (rev 4177)
@@ -34,7 +34,7 @@
String getCategory();
- /** does this binding apply to the given element? */
+ /** does this binding appliesTo to the given element? */
boolean matches(Element element);
/** translates the given element into a domain model java object.
17 years, 2 months
JBoss JBPM SVN: r4176 - jbpm4/branches.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-06 13:28:27 -0500 (Fri, 06 Mar 2009)
New Revision: 4176
Added:
jbpm4/branches/hbraun/
Log:
Create user branch
Copied: jbpm4/branches/hbraun (from rev 4175, jbpm4/trunk)
17 years, 2 months
JBoss JBPM SVN: r4175 - jbpm4/branches.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-06 13:27:56 -0500 (Fri, 06 Mar 2009)
New Revision: 4175
Removed:
jbpm4/branches/hbraun/
Log:
redo branch
17 years, 2 months
JBoss JBPM SVN: r4174 - jbpm4/branches/tbaeyens/modules/enterprise-test.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-03-06 11:45:53 -0500 (Fri, 06 Mar 2009)
New Revision: 4174
Modified:
jbpm4/branches/tbaeyens/modules/enterprise-test/
Log:
work
Property changes on: jbpm4/branches/tbaeyens/modules/enterprise-test
___________________________________________________________________
Name: svn:ignore
+ target
17 years, 2 months
JBoss JBPM SVN: r4172 - in jbpm4/branches/tbaeyens/modules: enterprise-test and 16 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-03-06 11:33:02 -0500 (Fri, 06 Mar 2009)
New Revision: 4172
Added:
jbpm4/branches/tbaeyens/modules/enterprise-test/
jbpm4/branches/tbaeyens/modules/enterprise-test/.classpath
jbpm4/branches/tbaeyens/modules/enterprise-test/.project
jbpm4/branches/tbaeyens/modules/enterprise-test/pom.xml
jbpm4/branches/tbaeyens/modules/enterprise-test/src/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/test/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/test/JbpmTestServlet.java
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/resources/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/resources/index.jsp
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/WEB-INF/
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/WEB-INF/web.xml
jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/index.jsp
jbpm4/branches/tbaeyens/modules/enterprise-test/target/
jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/
jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/index.jsp
jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/org/
jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/org/jbpm/
jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/org/jbpm/test/
jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/org/jbpm/test/JbpmTestServlet.class
jbpm4/branches/tbaeyens/modules/enterprise-test/target/work/
jbpm4/branches/tbaeyens/modules/enterprise-test/target/work/jsp/
Modified:
jbpm4/branches/tbaeyens/modules/examples/pom.xml
Log:
work
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/.classpath
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/.classpath (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/.classpath 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <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/test-classes"/>
+</classpath>
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/.project
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/.project (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/.project 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>enterprise-test</name>
+ <comment></comment>
+ <projects>
+ </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>
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/pom.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/pom.xml 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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">
+
+ <!-- Module Info -->
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-enterprise-test</artifactId>
+ <packaging>war</packaging>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>jBPM 4 - Enterprise Test Webapp</name>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-base</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>jbpmtest</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: jbpm4/branches/tbaeyens/modules/enterprise-test/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/test/JbpmTestServlet.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/test/JbpmTestServlet.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/test/JbpmTestServlet.java 2009-03-06 16:33:02 UTC (rev 4172)
@@ -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;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JbpmTestServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ System.out.println("request came in");
+ PrintWriter writer = resp.getWriter();
+ writer.println("OK");
+ }
+}
Property changes on: jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/java/org/jbpm/test/JbpmTestServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/resources/index.jsp
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/resources/index.jsp (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/resources/index.jsp 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <h2>Hello World!</h2>
+ </body>
+</html>
+
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/WEB-INF/web.xml 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,17 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Archetype Created Web Application</display-name>
+
+ <servlet>
+ <servlet-name>JbpmTestExecutor</servlet-name>
+ <servlet-class>org.jbpm.test.JbpmTestServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>JbpmTestExecutor</servlet-name>
+ <url-pattern>/runtest</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Property changes on: jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/index.jsp
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/index.jsp (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/src/main/webapp/index.jsp 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/index.jsp
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/index.jsp (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/index.jsp 2009-03-06 16:33:02 UTC (rev 4172)
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <h2>Hello World!</h2>
+ </body>
+</html>
+
Added: jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/org/jbpm/test/JbpmTestServlet.class
===================================================================
(Binary files differ)
Property changes on: jbpm4/branches/tbaeyens/modules/enterprise-test/target/classes/org/jbpm/test/JbpmTestServlet.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: jbpm4/branches/tbaeyens/modules/examples/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/pom.xml 2009-03-06 15:43:25 UTC (rev 4171)
+++ jbpm4/branches/tbaeyens/modules/examples/pom.xml 2009-03-06 16:33:02 UTC (rev 4172)
@@ -11,6 +11,8 @@
<!-- $Id: pom.xml 4068 2009-02-27 14:27:54Z tom.baeyens(a)jboss.com $ -->
<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">
+
+ <!-- Module Info -->
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - Examples</name>
<groupId>org.jbpm.jbpm4</groupId>
17 years, 2 months
JBoss JBPM SVN: r4171 - in jbpm3/branches/jbpm-3.2.6.GA: modules/enterprise and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-03-06 10:43:25 -0500 (Fri, 06 Mar 2009)
New Revision: 4171
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml
jbpm3/branches/jbpm-3.2.6.GA/pom.xml
Log:
Restore slf4j for enterprise test suite
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml 2009-03-06 15:32:28 UTC (rev 4170)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml 2009-03-06 15:43:25 UTC (rev 4171)
@@ -95,6 +95,11 @@
<artifactId>bpm-spec-api</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<!-- Plugins -->
Modified: jbpm3/branches/jbpm-3.2.6.GA/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/pom.xml 2009-03-06 15:32:28 UTC (rev 4170)
+++ jbpm3/branches/jbpm-3.2.6.GA/pom.xml 2009-03-06 15:43:25 UTC (rev 4171)
@@ -82,6 +82,7 @@
<poi.version>3.0.2-FINAL</poi.version>
<richfaces.ui.version>3.2.1.GA</richfaces.ui.version>
<report-server.version>1.0.0.Beta1</report-server.version>
+ <slf4j.version>1.5.5</slf4j.version>
<sun.facelets.version>1.1.14</sun.facelets.version>
<!-- Database Driver Versions -->
@@ -349,6 +350,16 @@
<version>${richfaces.ui.version}</version>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
<groupId>poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
17 years, 2 months
JBoss JBPM SVN: r4170 - jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-03-06 10:32:28 -0500 (Fri, 06 Mar 2009)
New Revision: 4170
Modified:
jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh
Log:
Restore jconnect-6.0.5.jar
Modified: jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh 2009-03-06 15:17:23 UTC (rev 4169)
+++ jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh 2009-03-06 15:32:28 UTC (rev 4170)
@@ -67,6 +67,14 @@
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
+# FIXME: find out whether jTDS can be made to work with XA data source
+# https://jira.jboss.org/jira/browse/JBPM-1818
+SYBASE_JDBC_DRIVER=~/.m2/repository/com/sybase/jconnect/6.0.5/jconnect-6.0.5.jar
+if [ -f $SYBASE_JDBC_DRIVER ]; then
+ echo "cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
+ cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
+fi
+
#
# start jbossas
#
17 years, 2 months
JBoss JBPM SVN: r4169 - in jbpm3/branches/jbpm-3.2.6.GA: hudson/hudson-home and 4 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-03-06 10:17:23 -0500 (Fri, 06 Mar 2009)
New Revision: 4169
Modified:
jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh
jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml
jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/pom.xml
jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml
jbpm3/branches/jbpm-3.2.6.GA/pom.xml
Log:
Remove dependency on slf4j
Modified: jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh 2009-03-06 14:31:43 UTC (rev 4168)
+++ jbpm3/branches/jbpm-3.2.6.GA/hudson/hudson-home/command.sh 2009-03-06 15:17:23 UTC (rev 4169)
@@ -66,18 +66,7 @@
rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
-if [ $CONTAINER = "jboss500" ]; then
- rm $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/slf4j-api.jar
-fi
-# FIXME: find out whether jTDS can be made to work with XA data source
-# https://jira.jboss.org/jira/browse/JBPM-1818
-SYBASE_JDBC_DRIVER=~/.m2/repository/com/sybase/jconnect/6.0.5/jconnect-6.0.5.jar
-if [ -f $SYBASE_JDBC_DRIVER ]; then
- echo "cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
- cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
-fi
-
#
# start jbossas
#
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml 2009-03-06 14:31:43 UTC (rev 4168)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml 2009-03-06 15:17:23 UTC (rev 4169)
@@ -79,22 +79,11 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- </dependency>
<!-- Test Dependencies -->
<dependency>
@@ -107,11 +96,6 @@
<artifactId>jaxen</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
- </dependency>
<!-- Remove this static dependency -->
<dependency>
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/pom.xml 2009-03-06 14:31:43 UTC (rev 4168)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/pom.xml 2009-03-06 15:17:23 UTC (rev 4169)
@@ -154,14 +154,6 @@
<type>zip</type>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/src/main/resources/installer/install-definition.xml 2009-03-06 14:31:43 UTC (rev 4168)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/distribution/src/main/resources/installer/install-definition.xml 2009-03-06 15:17:23 UTC (rev 4169)
@@ -169,8 +169,6 @@
<include name="jbpm-identity.jar" />
<include name="junit.jar" />
<include name="jsf-console.war" />
- <include name="slf4j-api.jar" />
- <include name="slf4j-log4j12.jar" />
<include name="log4j.jar" />
</fileset>
@@ -205,8 +203,6 @@
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm-jpdl.jar" />
<include name="jbpm-identity.jar" />
- <include name="slf4j-api.jar" />
- <include name="slf4j-log4j12.jar" />
</fileset>
<file src="@{deploy.artifacts.dir}/lib/jbpm-identity-service.zip" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
unpack="true" override="true" />
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml 2009-03-06 14:31:43 UTC (rev 4168)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml 2009-03-06 15:17:23 UTC (rev 4169)
@@ -95,11 +95,6 @@
<artifactId>bpm-spec-api</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<!-- Plugins -->
Modified: jbpm3/branches/jbpm-3.2.6.GA/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/pom.xml 2009-03-06 14:31:43 UTC (rev 4168)
+++ jbpm3/branches/jbpm-3.2.6.GA/pom.xml 2009-03-06 15:17:23 UTC (rev 4169)
@@ -82,7 +82,6 @@
<poi.version>3.0.2-FINAL</poi.version>
<richfaces.ui.version>3.2.1.GA</richfaces.ui.version>
<report-server.version>1.0.0.Beta1</report-server.version>
- <slf4j.version>1.5.5</slf4j.version>
<sun.facelets.version>1.1.14</sun.facelets.version>
<!-- Database Driver Versions -->
@@ -350,16 +349,6 @@
<version>${richfaces.ui.version}</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
<groupId>poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
17 years, 2 months