JBoss JBPM SVN: r4228 - in projects/gwt-console/trunk: server and 3 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-11 10:15:09 -0400 (Wed, 11 Mar 2009)
New Revision: 4228
Modified:
projects/gwt-console/trunk/gwt-parent.iml
projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
projects/gwt-console/trunk/server/gwt-server.iml
projects/gwt-console/trunk/war/gwt-war.iml
Log:
Update default management factory reference
Modified: projects/gwt-console/trunk/gwt-parent.iml
===================================================================
--- projects/gwt-console/trunk/gwt-parent.iml 2009-03-11 12:07:28 UTC (rev 4227)
+++ projects/gwt-console/trunk/gwt-parent.iml 2009-03-11 14:15:09 UTC (rev 4228)
@@ -20,6 +20,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="gwt-server-integration" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
<CLASSES>
Modified: projects/gwt-console/trunk/server/gwt-server.iml
===================================================================
--- projects/gwt-console/trunk/server/gwt-server.iml 2009-03-11 12:07:28 UTC (rev 4227)
+++ projects/gwt-console/trunk/server/gwt-server.iml 2009-03-11 14:15:09 UTC (rev 4228)
@@ -10,9 +10,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-parent" />
- <orderEntry type="module" module-name="gwt-server-integration" />
- <orderEntry type="module" module-name="gwt-rpc" />
+ <orderEntry type="module" module-name="gwt-rpc" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" exported="" />
+ <orderEntry type="module" module-name="gwt-server-integration" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
<CLASSES>
@@ -226,7 +226,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0.2.GA/resteasy-jaxrs-1.0.2.GA.jar!/" />
@@ -235,7 +235,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0.2.GA/jaxrs-api-1.0.2.GA.jar!/" />
Modified: projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
===================================================================
--- projects/gwt-console/trunk/server-integration/gwt-server-integration.iml 2009-03-11 12:07:28 UTC (rev 4227)
+++ projects/gwt-console/trunk/server-integration/gwt-server-integration.iml 2009-03-11 14:15:09 UTC (rev 4228)
@@ -8,8 +8,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-parent" />
- <orderEntry type="module-library">
+ <orderEntry type="module" module-name="gwt-parent" exported="" />
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
@@ -18,7 +18,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/" />
@@ -27,7 +27,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
@@ -36,7 +36,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
@@ -45,7 +45,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
@@ -56,7 +56,7 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.javaee:jboss-javaee:jar:5.0.0.GA:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA.jar!/" />
Modified: projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
===================================================================
--- projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java 2009-03-11 12:07:28 UTC (rev 4227)
+++ projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java 2009-03-11 14:15:09 UTC (rev 4228)
@@ -40,7 +40,7 @@
return (ManagementFactory)
ServiceLoader.loadService(
ManagementFactory.class.getName(),
- "org.jbpm.enterprise.mgmt.ManagementFactoryImpl"
+ "org.jbpm.integration.console.ManagementFactoryImpl"
);
}
Modified: projects/gwt-console/trunk/war/gwt-war.iml
===================================================================
--- projects/gwt-console/trunk/war/gwt-war.iml 2009-03-11 12:07:28 UTC (rev 4227)
+++ projects/gwt-console/trunk/war/gwt-war.iml 2009-03-11 14:15:09 UTC (rev 4228)
@@ -11,7 +11,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-parent" />
+ <orderEntry type="module" module-name="gwt-parent" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
<CLASSES>
17 years, 1 month
JBoss JBPM SVN: r4227 - in jbpm4/trunk/modules: distro/scripts and 8 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-11 08:07:28 -0400 (Wed, 11 Mar 2009)
New Revision: 4227
Added:
jbpm4/trunk/modules/integration/spi/scripts/
jbpm4/trunk/modules/integration/spi/scripts/assembly-config.xml
jbpm4/trunk/modules/integration/spi/src/main/resources/jboss-service.xml
jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-roles.properties
jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-users.properties
jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm.cfg.xml
Removed:
jbpm4/trunk/modules/enterprise/src/main/resources/jboss-service.xml
jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-roles.properties
jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-users.properties
jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
Modified:
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml
jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
jbpm4/trunk/modules/enterprise/pom.xml
jbpm4/trunk/modules/enterprise/scripts/assembly-config.xml
jbpm4/trunk/modules/integration/spi/pom.xml
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
Log:
Move jbpm.cfg.xml for AS integration to 'modules/integration/spi' and thus remove the dependency on the enterprise module.
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -96,6 +96,12 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spi</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jboss5</artifactId>
<version>${version}</version>
</dependency>
Modified: jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -56,6 +56,14 @@
</includes>
<unpack>true</unpack>
</dependencySet>
+ <dependencySet>
+ <outputDirectory>resources/jbpm-spi-config</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>*:jbpm-spi:jar:config</include>
+ </includes>
+ <unpack>true</unpack>
+ </dependencySet>
<dependencySet>
<outputDirectory>resources/jbpm-jboss5-config</outputDirectory>
<useStrictFiltering>true</useStrictFiltering>
Modified: jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -154,27 +154,17 @@
<pack name="Install jBPM in JBoss" required="no" preselected="yes">
<description>The Install jBPM in JBoss</description>
-
- <!-- jbpm/jbpm-service.sar
- <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-jpdl-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
- <include name="logging.properties"/>
- </fileset>
- -->
-
- <!-- jbpm/jbpm-service.sar , enterprise config-->
- <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
+
+ <!-- jbpm/jbpm-service.sar , spi config-->
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-spi-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar" override="true">
<include name="jbpm.cfg.xml"/>
<include name="jbpm-users.properties"/>
<include name="jbpm-roles.properties"/>
</fileset>
- <!-- jbpm/jbpm-service.sar/META-INF , enterprise config-->
- <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/META-INF" override="true">
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-spi-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/META-INF" override="true">
<include name="jboss-service.xml"/>
</fileset>
-
- <!--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-pvm.jar" />
<include name="jbpm-jpdl.jar" />
@@ -183,14 +173,9 @@
<!-- jbpm/jbpm-enterprise.jar -->
<file src="@{deploy.artifacts.dir}/lib/jbpm-enterprise.jar" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-enterprise.jar"
- unpack="true" override="true" />
+ unpack="true" override="true" />
-
- <!-- jbpm/jbpm-userguide.war -->
- <!--file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.jdocbook" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-userguide.war"
- unpack="true" override="true" /-->
-
- <!-- jbpm-destinations-service.xml -->
+ <!-- enterprise config, jbpm-destinations-service.xml -->
<fileset dir="@{deploy.artifacts.dir}/resources/jbpm-enterprise-config" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/" override="true">
<include name="jbpm-destinations-service.xml"/>
</fileset>
Modified: jbpm4/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/enterprise/pom.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -81,12 +81,8 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
- <excludes>
- <exclude>jbpm.cfg.xml</exclude>
- <exclude>jbpm-destinations-service.xml</exclude>
- <exclude>jbpm-users.properties</exclude>
- <exclude>jbpm-roles.properties</exclude>
- <exclude>jboss-service.xml</exclude>
+ <excludes>
+ <exclude>jbpm-destinations-service.xml</exclude>
</excludes>
</configuration>
</plugin>
Modified: jbpm4/trunk/modules/enterprise/scripts/assembly-config.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/scripts/assembly-config.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/enterprise/scripts/assembly-config.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -9,12 +9,8 @@
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/</outputDirectory>
- <includes>
- <include>jbpm.cfg.xml</include>
+ <includes>
<include>jbpm-destinations-service.xml</include>
- <include>jbpm-users.properties</include>
- <include>jbpm-roles.properties</include>
- <include>jboss-service.xml</include>
</includes>
</fileSet>
</fileSets>
Deleted: jbpm4/trunk/modules/enterprise/src/main/resources/jboss-service.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/resources/jboss-service.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/enterprise/src/main/resources/jboss-service.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
- <!-- The custom JAAS login configuration that installs
- a Configuration capable of dynamically updating the
- config settings
- -->
- <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="org.jboss.jbpm:service=LoginConfig">
- <attribute name="PolicyConfig" serialDataType="jbxb">
- <jaas:policy xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd" xmlns:jaas="urn:jboss:security-config:4.1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <jaas:application-policy name="jbpm-console">
- <jaas:authentication>
-
- <!-- Simple authentication -->
- <jaas:login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
- flag="required">
- <jaas:module-option name="usersProperties">jbpm-users.properties</jaas:module-option>
- <jaas:module-option name="rolesProperties">jbpm-roles.properties</jaas:module-option>
- </jaas:login-module>
-
-
- <!-- Authenticate against the IDM database -->
- <!--jaas:login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
- <jaas:module-option name="dsJndiName">java:/JbpmDS</jaas:module-option>
- <jaas:module-option name="principalsQuery"> SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=? </jaas:module-option>
- <jaas:module-option name="rolesQuery">
- SELECT g.NAME_ ,'Roles' FROM JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g
- WHERE g.TYPE_='security-role' AND m.GROUP_ = g.ID_ AND m.USER_ = u.ID_ AND u.NAME_=? </jaas:module-option>
- </jaas:login-module-->
- </jaas:authentication>
- </jaas:application-policy>
- </jaas:policy>
- </attribute>
- <depends optional-attribute-name="LoginConfigService"> jboss.security:service=XMLLoginConfig</depends>
- <depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager</depends>
- </mbean>
-</server>
Deleted: jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-roles.properties
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-roles.properties 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-roles.properties 2009-03-11 12:07:28 UTC (rev 4227)
@@ -1 +0,0 @@
-admin=admin
\ No newline at end of file
Deleted: jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-users.properties
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-users.properties 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-users.properties 2009-03-11 12:07:28 UTC (rev 4227)
@@ -1 +0,0 @@
-admin=admin
\ No newline at end of file
Deleted: jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- jBPM4 configuration used within the AS.
- Uses different command service and environment config.
--->
-
-<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
-
- <process-engine-context>
-
- <deployer-manager>
- <assign-file-type>
- <file extension=".jpdl.xml" type="jpdl" />
- </assign-file-type>
- <parse-jpdl />
- <check-process />
- <check-problems />
- <save policy="org.jbpm.pvm.internal.wire.binding.VersionTimestampPolicy"/>
- </deployer-manager>
-
- <process-service />
- <execution-service />
- <management-service />
-
- <command-service>
- <retry-interceptor />
- <environment-interceptor />
- <!-- TODO: JBPM-2101 TX interceptor with 'required' semantics -->
- </command-service>
-
- <hibernate-configuration resource="hibernate.cfg.xml"/>
-
- <hibernate-session-factory />
-
- <job-executor auto-start="true" />
-
- <id-generator />
- <types resource="jbpm.pvm.types.xml" />
-
- <business-calendar>
- <monday hours="9:00-12:00 and 12:30-17:00"/>
- <tuesday hours="9:00-12:00 and 12:30-17:00"/>
- <wednesday hours="9:00-12:00 and 12:30-17:00"/>
- <thursday hours="9:00-12:00 and 12:30-17:00"/>
- <friday hours="9:00-12:00 and 12:30-17:00"/>
- <holiday period="01/07/2008 - 31/08/2008"/>
- </business-calendar>
-
- </process-engine-context>
-
- <transaction-context>
- <hibernate-session current="true"/>
- <pvm-db-session />
- <job-db-session />
- <task-db-session />
- <message-session />
- <timer-session />
- </transaction-context>
-
-</jbpm-configuration>
Modified: jbpm4/trunk/modules/integration/spi/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/spi/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/integration/spi/pom.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -35,7 +35,7 @@
<!-- Build -->
<build>
<plugins>
- <!--plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
@@ -52,12 +52,15 @@
</configuration>
</execution>
</executions>
- </plugin-->
+ </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
- <exclude>*beans.xml</exclude>
+ <exclude>jbpm.cfg.xml</exclude>
+ <exclude>jbpm-users.properties</exclude>
+ <exclude>jbpm-roles.properties</exclude>
+ <exclude>jboss-service.xml</exclude>
</excludes>
</configuration>
</plugin>
Added: jbpm4/trunk/modules/integration/spi/scripts/assembly-config.xml
===================================================================
--- jbpm4/trunk/modules/integration/spi/scripts/assembly-config.xml (rev 0)
+++ jbpm4/trunk/modules/integration/spi/scripts/assembly-config.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -0,0 +1,20 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>jbpm.cfg.xml</include>
+ <include>jbpm-users.properties</include>
+ <include>jbpm-roles.properties</include>
+ <include>jboss-service.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Modified: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java 2009-03-11 11:37:42 UTC (rev 4226)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java 2009-03-11 12:07:28 UTC (rev 4227)
@@ -124,14 +124,16 @@
File deploymentArtifact = new File(ref.getLocation());
if(!deploymentArtifact.exists())
{
- log.info("The deployment artifact for process '"+ref+" has been removed."+
- " The process will be deleted");
+ log.info("The deployment artifact for process '"+ref+" has been deleted."+
+ " The process definition will be removed.");
processService.deleteProcessDefinition(ref.getProcessId());
}
else
{
- // TODO: if the file reamains, mark the process as 'shutdown'
+ // TODO: if the file remains, mark the process as 'shutdown'
+ log.info("The deployment artifact for process '"+ref+"' retains. " +
+ "Keep process definition.");
}
}
Copied: jbpm4/trunk/modules/integration/spi/src/main/resources/jboss-service.xml (from rev 4225, jbpm4/trunk/modules/enterprise/src/main/resources/jboss-service.xml)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/resources/jboss-service.xml (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/resources/jboss-service.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <!-- The custom JAAS login configuration that installs
+ a Configuration capable of dynamically updating the
+ config settings
+ -->
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="org.jboss.jbpm:service=LoginConfig">
+ <attribute name="PolicyConfig" serialDataType="jbxb">
+ <jaas:policy xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd" xmlns:jaas="urn:jboss:security-config:4.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <jaas:application-policy name="jbpm-console">
+ <jaas:authentication>
+
+ <!-- Simple authentication -->
+ <jaas:login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <jaas:module-option name="usersProperties">jbpm-users.properties</jaas:module-option>
+ <jaas:module-option name="rolesProperties">jbpm-roles.properties</jaas:module-option>
+ </jaas:login-module>
+
+
+ <!-- Authenticate against the IDM database -->
+ <!--jaas:login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
+ <jaas:module-option name="dsJndiName">java:/JbpmDS</jaas:module-option>
+ <jaas:module-option name="principalsQuery"> SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=? </jaas:module-option>
+ <jaas:module-option name="rolesQuery">
+ SELECT g.NAME_ ,'Roles' FROM JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g
+ WHERE g.TYPE_='security-role' AND m.GROUP_ = g.ID_ AND m.USER_ = u.ID_ AND u.NAME_=? </jaas:module-option>
+ </jaas:login-module-->
+ </jaas:authentication>
+ </jaas:application-policy>
+ </jaas:policy>
+ </attribute>
+ <depends optional-attribute-name="LoginConfigService"> jboss.security:service=XMLLoginConfig</depends>
+ <depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager</depends>
+ </mbean>
+</server>
Copied: jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-roles.properties (from rev 4225, jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-roles.properties)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-roles.properties (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-roles.properties 2009-03-11 12:07:28 UTC (rev 4227)
@@ -0,0 +1 @@
+admin=admin
\ No newline at end of file
Copied: jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-users.properties (from rev 4225, jbpm4/trunk/modules/enterprise/src/main/resources/jbpm-users.properties)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-users.properties (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm-users.properties 2009-03-11 12:07:28 UTC (rev 4227)
@@ -0,0 +1 @@
+admin=admin
\ No newline at end of file
Added: jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/resources/jbpm.cfg.xml 2009-03-11 12:07:28 UTC (rev 4227)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ jBPM4 configuration used within the AS.
+ Uses different command service and environment config.
+
+ Resides with 'modules/integration/spi'
+-->
+
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine-context>
+
+ <deployer-manager>
+ <assign-file-type>
+ <file extension=".jpdl.xml" type="jpdl" />
+ </assign-file-type>
+ <parse-jpdl />
+ <check-process />
+ <check-problems />
+ <save policy="org.jbpm.pvm.internal.wire.binding.VersionTimestampPolicy"/>
+ </deployer-manager>
+
+ <process-service />
+ <execution-service />
+ <management-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <!-- TODO: JBPM-2101 TX interceptor with 'required' semantics -->
+ </command-service>
+
+ <hibernate-configuration resource="hibernate.cfg.xml"/>
+
+ <hibernate-session-factory />
+
+ <job-executor auto-start="true" />
+
+ <id-generator />
+ <types resource="jbpm.pvm.types.xml" />
+
+ <business-calendar>
+ <monday hours="9:00-12:00 and 12:30-17:00"/>
+ <tuesday hours="9:00-12:00 and 12:30-17:00"/>
+ <wednesday hours="9:00-12:00 and 12:30-17:00"/>
+ <thursday hours="9:00-12:00 and 12:30-17:00"/>
+ <friday hours="9:00-12:00 and 12:30-17:00"/>
+ <holiday period="01/07/2008 - 31/08/2008"/>
+ </business-calendar>
+
+ </process-engine-context>
+
+ <transaction-context>
+ <hibernate-session current="true"/>
+ <pvm-db-session />
+ <job-db-session />
+ <task-db-session />
+ <message-session />
+ <timer-session />
+ </transaction-context>
+
+</jbpm-configuration>
17 years, 1 month
JBoss JBPM SVN: r4226 - in jbpm4/trunk/modules: distro and 21 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-11 07:37:42 -0400 (Wed, 11 Mar 2009)
New Revision: 4226
Added:
jbpm4/trunk/modules/integration/console/
jbpm4/trunk/modules/integration/console/integration-console.iml
jbpm4/trunk/modules/integration/console/pom.xml
jbpm4/trunk/modules/integration/console/src/
jbpm4/trunk/modules/integration/console/src/main/
jbpm4/trunk/modules/integration/console/src/main/java/
jbpm4/trunk/modules/integration/console/src/main/java/org/
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ManagementFactoryImpl.java
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ProcessManagementImpl.java
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java
jbpm4/trunk/modules/integration/console/src/main/resources/
jbpm4/trunk/modules/integration/console/src/main/resources/META-INF/
jbpm4/trunk/modules/integration/console/src/main/resources/META-INF/services/
jbpm4/trunk/modules/integration/console/src/main/resources/META-INF/services/org.jboss.bpm.console.server.integration.ManagementFactory
Removed:
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/
jbpm4/trunk/modules/enterprise/src/main/resources/META-INF/services/
Modified:
jbpm4/trunk/modules/db/jbpm4-db.iml
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
jbpm4/trunk/modules/enterprise/pom.xml
jbpm4/trunk/modules/examples/jbpm4-examples.iml
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
jbpm4/trunk/modules/integration/pom.xml
jbpm4/trunk/modules/integration/spi/integration-spi.iml
Log:
Move the console integration to modules/integration
Modified: jbpm4/trunk/modules/db/jbpm4-db.iml
===================================================================
--- jbpm4/trunk/modules/db/jbpm4-db.iml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/db/jbpm4-db.iml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -9,9 +9,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" />
- <orderEntry type="module" module-name="jpdl" />
- <orderEntry type="module" module-name="pvm" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
@@ -339,7 +339,7 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
@@ -348,7 +348,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: mysql:mysql-connector-java:jar:5.0.8:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/mysql/mysql-connector-java/5.0.8/mysql-connector-java-5.0.8.jar!/" />
@@ -357,7 +357,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: net.sourceforge.jtds:jtds:jar:1.2.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/net/sourceforge/jtds/jtds/1.2.2/jtds-1.2.2.jar!/" />
@@ -366,7 +366,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: postgresql:postgresql:jar:8.3-603.jdbc3:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/postgresql/postgresql/8.3-603.jdbc3/postgresql-8.3-603.jdbc3.jar!/" />
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -119,6 +119,11 @@
<!-- GWT Console -->
<dependency>
+ <artifactId>jbpm-console-integration</artifactId>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console</artifactId>
<type>war</type>
Modified: jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -178,7 +178,7 @@
<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" />
+ <include name="jbpm-console-integration.jar" />
</fileset>
<!-- jbpm/jbpm-enterprise.jar -->
Modified: jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
===================================================================
--- jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -13,10 +13,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" exported="" />
<orderEntry type="module" module-name="jpdl" exported="" />
- <orderEntry type="module" module-name="gwt-parent" exported="" />
- <orderEntry type="module" module-name="integration-spi" exported="" />
<orderEntry type="module" module-name="pvm" exported="" />
- <orderEntry type="module" module-name="gwt-server-integration" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: cargo:cargo:jar:0.5:test">
<CLASSES>
@@ -489,15 +486,6 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: jbpm4/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/enterprise/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -39,13 +39,8 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-pvm</artifactId>
<version>${version}</version>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.jboss.bpm</groupId>
- <artifactId>gwt-console-server-integration</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-spi</artifactId>
<version>${version}</version>
Modified: jbpm4/trunk/modules/examples/jbpm4-examples.iml
===================================================================
--- jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -9,9 +9,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" exported="" />
- <orderEntry type="module" module-name="jpdl" exported="" />
- <orderEntry type="module" module-name="pvm" exported="" />
+ <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="pvm" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
Added: jbpm4/trunk/modules/integration/console/integration-console.iml
===================================================================
--- jbpm4/trunk/modules/integration/console/integration-console.iml (rev 0)
+++ jbpm4/trunk/modules/integration/console/integration-console.iml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="gwt-parent" />
+ <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="gwt-server-integration" />
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/jboss/jboss-j2ee/4.2.2.GA/jboss-j2ee-4.2.2.GA.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Added: jbpm4/trunk/modules/integration/console/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/console/pom.xml (rev 0)
+++ jbpm4/trunk/modules/integration/console/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1,43 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>jBPM 4 - Integration Console</name>
+ <description>JBoss jBPM - GWT console integration</description>
+
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-console-integration</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-integration</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ <javax.jaxb.version>2.1</javax.jaxb.version>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-api</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-server-integration</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>${javax.jaxb.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ManagementFactoryImpl.java
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ManagementFactoryImpl.java (rev 0)
+++ jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ManagementFactoryImpl.java 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1,50 @@
+/*
+ * 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.console;
+
+import org.jboss.bpm.console.server.util.InvocationProxy;
+import org.jboss.bpm.console.server.integration.ManagementFactory;
+import org.jboss.bpm.console.server.integration.TaskManagement;
+import org.jboss.bpm.console.server.integration.ProcessManagement;
+import org.jboss.bpm.console.server.integration.UserManagement;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ManagementFactoryImpl extends ManagementFactory
+{
+ public ProcessManagement createProcessManagement()
+ {
+ return (ProcessManagement)
+ InvocationProxy.newInstance(new ProcessManagementImpl());
+ }
+
+ public TaskManagement createTaskManagement()
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public UserManagement createUserManagement()
+ {
+ throw new RuntimeException("Not implemented");
+ }
+}
Added: jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java (rev 0)
+++ jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1,99 @@
+/*
+ * 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.console;
+
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
+
+import org.jbpm.model.OpenExecution;
+import org.jbpm.model.OpenProcessDefinition;
+import org.jbpm.model.Transition;
+
+import java.util.Date;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ModelAdaptor
+{
+ public static ProcessDefinitionRef adoptDefinition(OpenProcessDefinition p0)
+ {
+ ProcessDefinitionRef def = new ProcessDefinitionRef();
+ def.setId( p0.getId() );
+ def.setName(p0.getName());
+ def.setVersion(p0.getVersion());
+
+ def.setKey( p0.getKey() );
+ def.setDescription(p0.getDescription());
+ def.setPackageName(p0.getPackageName());
+
+ return def;
+
+ }
+
+ public static ProcessInstanceRef adoptExecution(OpenExecution e0)
+ {
+ ProcessInstanceRef ref = new ProcessInstanceRef();
+ ref.setId( e0.getId() );
+ ref.setKey(e0.getKey());
+ ref.setDefinitionId(e0.getProcessDefinition().getId() );
+ ref.setStartDate( new Date() ); // TODO: FIXME
+
+ OpenExecution topLevelExecution = e0.getProcessInstance();
+ TokenReference tok = execution2TokenReference(topLevelExecution);
+
+ Collection<OpenExecution> childExecutions = topLevelExecution.getExecutions();
+ if(childExecutions!=null)
+ {
+ for(OpenExecution childExecution : childExecutions)
+ {
+ TokenReference childTok = execution2TokenReference(childExecution);
+ tok.getChildren().add(childTok);
+ }
+ }
+
+ ref.setRootToken(tok);
+
+ return ref;
+ }
+
+ private static TokenReference execution2TokenReference(OpenExecution topLevelExecution)
+ {
+ TokenReference tok = new TokenReference();
+ tok.setName(topLevelExecution.getName());
+ tok.setId(topLevelExecution.getId());
+ tok.setCurrentNodeName( topLevelExecution.getActivityName() );
+
+ List<String> availableSignals = new ArrayList<String>();
+ for(Transition t : topLevelExecution.getActivity().getOutgoingTransitions())
+ {
+ availableSignals.add(t.getName());
+ }
+
+ tok.setAvailableSignals(availableSignals);
+ return tok;
+ }
+}
Added: jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ProcessManagementImpl.java
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ProcessManagementImpl.java (rev 0)
+++ jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ProcessManagementImpl.java 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1,186 @@
+/*
+ * 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.console;
+
+import org.jboss.bpm.console.server.integration.ProcessManagement;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jbpm.model.OpenProcessDefinition;
+import org.jbpm.model.OpenExecution;
+import org.jbpm.*;
+
+import javax.naming.InitialContext;
+import java.util.*;
+import java.io.InputStream;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+class ProcessManagementImpl implements ProcessManagement
+{
+ private ProcessEngine processEngine;
+
+ public ProcessManagementImpl()
+ {
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ this.processEngine = (ProcessEngine)ctx.lookup("java:/ProcessEngine");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to lookup process engine");
+ }
+
+ }
+
+ public List<ProcessDefinitionRef> getProcessDefinitions()
+ {
+ List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>();
+
+ ProcessService processService = this.processEngine.getProcessService();
+ List<String> keys = processService.findProcessDefinitionKeys();
+ Set<ProcessDefinition> definitions = new HashSet<ProcessDefinition>();
+ for(String key : keys)
+ {
+ definitions.addAll(
+ processService.findProcessDefinitionsByKey(key)
+ );
+ }
+
+ // adopt ProcessDefinition to console model
+ for(ProcessDefinition p0 : definitions)
+ {
+ results.add( ModelAdaptor.adoptDefinition((OpenProcessDefinition)p0) );
+ }
+
+ return results;
+
+ }
+
+ public ProcessDefinitionRef getProcessDefinition(String procDefId)
+ {
+ ProcessService processService = this.processEngine.getProcessService();
+ ProcessDefinition p0 = processService.findProcessDefinitionById(procDefId);
+ return ModelAdaptor.adoptDefinition((OpenProcessDefinition)p0);
+ }
+
+ public List<ProcessDefinitionRef> removeProcessDefinition(String procDefId)
+ {
+ ProcessService processService = this.processEngine.getProcessService();
+ processService.deleteProcessDefinitionCascade(procDefId);
+ return getProcessDefinitions();
+ }
+
+ public List<ProcessInstanceRef> getProcessInstances(String procDefId)
+ {
+ ExecutionService execService = this.processEngine.getExecutionService();
+ ExecutionQuery query = execService.createExecutionQuery();
+ query.processDefinitionId(String.valueOf(procDefId));
+
+ List<Execution> executions = query.execute();
+
+ List<ProcessInstanceRef> results = adoptTopLevelExecutions(executions);
+
+ return results;
+ }
+
+ private List<ProcessInstanceRef> adoptTopLevelExecutions(List<Execution> executions)
+ {
+ List<ProcessInstanceRef> results = new ArrayList<ProcessInstanceRef>();
+ for(Execution exec : executions)
+ {
+ if(exec.isEnded())
+ {
+ System.out.println("*** JBPM-2055: Execution ("+exec.getId()+") is already ended. Should not show up in query");
+ continue;
+ }
+
+ if(exec.isProcessInstance()) // parent execution
+ {
+ results.add( ModelAdaptor.adoptExecution((OpenExecution)exec) );
+ }
+ }
+ return results;
+ }
+
+ public ProcessInstanceRef getProcessInstance(String instanceId)
+ {
+ ExecutionService execService = this.processEngine.getExecutionService();
+ ExecutionQuery query = execService.createProcessInstanceQuery();
+ query.processInstanceId(instanceId);
+ List<Execution> executions = query.execute();
+
+ if(executions.size()>1 || executions.isEmpty())
+ throw new IllegalStateException("No precise match for instanceId " + instanceId +". Num results "+executions);
+
+ return ModelAdaptor.adoptExecution( (OpenExecution)executions.get(0));
+ }
+
+ public ProcessInstanceRef newInstance(String definitionId)
+ {
+ ExecutionService execService = this.processEngine.getExecutionService();
+ Execution exec = execService.startProcessInstanceById(definitionId);
+ return ModelAdaptor.adoptExecution((OpenExecution)exec);
+ }
+
+ public void setProcessState(String executionId, ProcessInstanceRef.STATE nextState)
+ {
+ if(ProcessInstanceRef.STATE.ENDED==nextState)
+ {
+ // TODO: It's actually a delte call. Once we got the 'cancel' notion this should be changed
+ ExecutionService execService = this.processEngine.getExecutionService();
+ Execution exec = execService.findExecution(executionId);
+ if(null==exec)
+ throw new IllegalArgumentException("No such execution with id "+ executionId);
+
+ execService.deleteProcessInstance(executionId);
+ }
+ else
+ {
+ throw new IllegalArgumentException("State " + nextState + " currently not supported");
+ }
+ }
+
+ public void signalExecution(String executionId, String signal)
+ {
+ ExecutionService execService = this.processEngine.getExecutionService();
+
+ if(null==signal)
+ execService.signalExecutionById(executionId);
+ else
+ execService.signalExecutionById(executionId, signal);
+
+ }
+
+ public void deploy(String fileName, String contentType, InputStream deployment)
+ {
+ List<ProcessDefinition> definitions =
+ this.processEngine.getProcessService()
+ .createDeployment()
+ .addInputStream(fileName, deployment)
+ .deploy()
+ .getProcessDefinitions();
+
+ }
+}
+
Added: jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java (rev 0)
+++ jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1,74 @@
+/*
+ * 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.console;
+
+import javax.ejb.EJBLocalHome;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+class ServiceLocator
+{
+ public static EJBLocalHome getEjbLocalHome(String localHomeJndiName)
+ {
+ EJBLocalHome localHome = null;
+ try
+ {
+ Context ctx = createContext();
+ localHome = (EJBLocalHome) ctx.lookup(localHomeJndiName);
+ }
+ catch (Exception cce)
+ {
+ throw new RuntimeException("Failed load access EJB: " +localHomeJndiName, cce);
+ }
+
+ return localHome;
+ }
+
+ public static UserTransaction getUserTransaction()
+ {
+ UserTransaction tx = null;
+
+ try
+ {
+ Context ctx = createContext();
+ tx = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to create UserTransaction");
+ }
+
+ return tx;
+ }
+
+ private static Context createContext()
+ throws NamingException
+ {
+ InitialContext ctx = new InitialContext();
+ return ctx;
+ }
+}
\ No newline at end of file
Added: jbpm4/trunk/modules/integration/console/src/main/resources/META-INF/services/org.jboss.bpm.console.server.integration.ManagementFactory
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/resources/META-INF/services/org.jboss.bpm.console.server.integration.ManagementFactory (rev 0)
+++ jbpm4/trunk/modules/integration/console/src/main/resources/META-INF/services/org.jboss.bpm.console.server.integration.ManagementFactory 2009-03-11 11:37:42 UTC (rev 4226)
@@ -0,0 +1 @@
+org.jbpm.integration.console.ManagementFactoryImpl
\ No newline at end of file
Modified: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-11 11:37:42 UTC (rev 4226)
@@ -125,9 +125,9 @@
subDeploymentRefs = adaptor.deploy(md);
allProcessRefs.addAll(subDeploymentRefs);
}
- catch (Throwable e)
+ catch (Throwable t)
{
- log.error("Failed to deploy " + rootDeployment.url, e);
+ log.error("Failed to deploy " + rootDeployment.url, t);
}
}
Modified: jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -9,10 +9,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" exported="" />
- <orderEntry type="module" module-name="jpdl" exported="" />
- <orderEntry type="module" module-name="integration-spi" exported="" />
- <orderEntry type="module" module-name="pvm" exported="" />
+ <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="pvm" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:compile">
<CLASSES>
@@ -1064,17 +1063,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.transaction:jta:jar:1.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
- </SOURCES>
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: javassist:javassist:jar:3.9.0.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar!/" />
@@ -1103,6 +1091,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-03-11 11:37:42 UTC (rev 4226)
@@ -61,11 +61,17 @@
// associate classloader
deployment.setClassloader(unit.getClassLoader());
- List<ProcessDeploymentRef> processRefs = adaptor.deploy(deployment);
+ try
+ {
+ List<ProcessDeploymentRef> processRefs = adaptor.deploy(deployment);
+ // TODO: mark the process 'ready', classloader assoc
+ unit.addAttachment("jbpm.deployer.reference", processRefs);
+ }
+ catch (Throwable t)
+ {
+ log.error("Failed to deploy " + deployment, t);
+ }
- // TODO: mark the process 'ready', classloader assoc
- unit.addAttachment("jbpm.deployer.reference", processRefs);
-
}
public void undeploy(DeploymentUnit unit, JBPMDeploymentMetaData deployment)
Modified: jbpm4/trunk/modules/integration/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/integration/pom.xml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -120,6 +120,7 @@
<module>spi</module>
<module>jboss5</module>
<module>jboss4</module>
+ <module>console</module>
</modules>
</project>
Modified: jbpm4/trunk/modules/integration/spi/integration-spi.iml
===================================================================
--- jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-03-11 10:11:59 UTC (rev 4225)
+++ jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-03-11 11:37:42 UTC (rev 4226)
@@ -9,9 +9,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" exported="" />
- <orderEntry type="module" module-name="jpdl" exported="" />
- <orderEntry type="module" module-name="pvm" exported="" />
+ <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="pvm" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
<CLASSES>
@@ -309,17 +309,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.transaction:jta:jar:1.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
- </SOURCES>
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: oswego-concurrent:concurrent:jar:1.3.4-jboss-update1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar!/" />
@@ -1100,6 +1089,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
17 years, 1 month
JBoss JBPM SVN: r4225 - in jbpm4/trunk/modules: db and 35 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-11 06:11:59 -0400 (Wed, 11 Mar 2009)
New Revision: 4225
Added:
jbpm4/trunk/modules/integration/jboss4/
jbpm4/trunk/modules/integration/jboss4/pom.xml
jbpm4/trunk/modules/integration/jboss4/scripts/
jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml
jbpm4/trunk/modules/integration/jboss4/src/
jbpm4/trunk/modules/integration/jboss4/src/main/
jbpm4/trunk/modules/integration/jboss4/src/main/java/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java
jbpm4/trunk/modules/integration/jboss4/src/main/resources/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml
jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm.deployer.cfg.xml
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMDeploymentMetaData.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceImpl.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineObjectFactory.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineReference.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java
Removed:
jbpm4/trunk/modules/integration/jboss4/pom.xml
jbpm4/trunk/modules/integration/jboss4/scripts/
jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml
jbpm4/trunk/modules/integration/jboss4/src/
jbpm4/trunk/modules/integration/jboss4/src/main/
jbpm4/trunk/modules/integration/jboss4/src/main/java/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java
jbpm4/trunk/modules/integration/jboss4/src/main/resources/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/
jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml
jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java
jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java
Modified:
jbpm4/trunk/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml
jbpm4/trunk/modules/db/jbpm4-db.iml
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml
jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
jbpm4/trunk/modules/enterprise/pom.xml
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java
jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
jbpm4/trunk/modules/examples/jbpm4-examples.iml
jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
jbpm4/trunk/modules/integration/jboss5/pom.xml
jbpm4/trunk/modules/integration/jboss5/scripts/assembly-config.xml
jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java
jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml
jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-service-jboss-beans.xml
jbpm4/trunk/modules/integration/pom.xml
jbpm4/trunk/modules/integration/spi/integration-spi.iml
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java
jbpm4/trunk/modules/test-db/jbpm4-test-db.iml
Log:
JBoss AS integration. svn merge -r4176:HEAD https://svn.jboss.org/repos/jbpm/jbpm4/branches/hbraun
Modified: jbpm4/trunk/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml
===================================================================
--- jbpm4/trunk/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/config/src/main/config/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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/trunk/modules/db/jbpm4-db.iml
===================================================================
--- jbpm4/trunk/modules/db/jbpm4-db.iml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/db/jbpm4-db.iml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -10,6 +10,8 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="jpdl" />
+ <orderEntry type="module" module-name="pvm" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
@@ -29,15 +31,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:jbossesb-rosetta:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/jbossesb-rosetta/4.4.0.GA/jbossesb-rosetta-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
@@ -56,24 +49,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax-api:jar:1.0.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: antlr:antlr:jar:2.7.6:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
@@ -92,15 +67,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax:jar:1.2.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jboss-j2ee/4.2.2.GA/jboss-j2ee-4.2.2.GA.jar!/" />
@@ -148,15 +114,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:test-util:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/test-util/4.4.0.GA/test-util-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
@@ -166,15 +123,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: jboss.jbossts:jbossts-common:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: log4j:log4j:jar:1.2.14:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -86,6 +86,9 @@
<artifactId>jbpm-test-db</artifactId>
<version>${version}</version>
</dependency>
+
+ <!-- server integration -->
+
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-spi</artifactId>
@@ -102,6 +105,17 @@
<classifier>config</classifier>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jboss4</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jboss4</artifactId>
+ <classifier>config</classifier>
+ <version>${version}</version>
+ </dependency>
<!-- GWT Console -->
<dependency>
Modified: jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml
===================================================================
--- jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/distro/scripts/assembly-deploy-artifacts.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -64,6 +64,14 @@
</includes>
<unpack>true</unpack>
</dependencySet>
+ <dependencySet>
+ <outputDirectory>resources/jbpm-jboss4-config</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>*:jbpm-jboss4:jar:config</include>
+ </includes>
+ <unpack>true</unpack>
+ </dependencySet>
<dependencySet>
<outputDirectory>resources/jbpm-db</outputDirectory>
<useStrictFiltering>true</useStrictFiltering>
Modified: jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/distro/src/main/resources/installer/install-definition.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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,8 +242,30 @@
condition="isJBoss423">
<include name="jbpm-api.jar"/>
<include name="jbpm-spi.jar"/>
+ <include name="jbpm-log.jar" />
</fileset>
+ <!-- deployer -->
+ <fileset dir="@{deploy.artifacts.dir}/lib/"
+ targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm.deployer"
+ override="true"
+ condition="isJBoss423">
+ <include name="jbpm-jboss4.jar"/>
+ </fileset>
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-jboss4-config/jbpm.deployer/META-INF"
+ targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm.deployer/META-INF"
+ override="true"
+ condition="isJBoss423">
+ <include name="jboss-service.xml"/>
+ </fileset>
+
+ <!-- service -->
+ <fileset dir="@{deploy.artifacts.dir}/resources/jbpm-jboss4-config/jbpm.beans/META-INF"
+ targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar/jbpm.beans/META-INF"
+ override="true"
+ condition="isJBoss423">
+ <include name="jboss-beans.xml"/>
+ </fileset>
<!--
==============================
JBoss 5
@@ -257,6 +279,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"
@@ -269,6 +292,7 @@
override="true"
condition="isJBoss500">
<include name="jbpm-service-jboss-beans.xml"/>
+ <!--include name="jbpm.deployer.cfg.xml"/-->
</fileset>
Modified: jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
===================================================================
--- jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -11,9 +11,12 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-parent" />
- <orderEntry type="module" module-name="toplevel" />
- <orderEntry type="module" module-name="gwt-server-integration" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="gwt-parent" exported="" />
+ <orderEntry type="module" module-name="integration-spi" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
+ <orderEntry type="module" module-name="gwt-server-integration" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: cargo:cargo:jar:0.5:test">
<CLASSES>
Modified: jbpm4/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/pom.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/enterprise/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -45,6 +45,11 @@
<artifactId>gwt-console-server-integration</artifactId>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -25,9 +25,13 @@
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jbpm.*;
+import org.jbpm.integration.spi.JBPMService;
+import org.jbpm.integration.spi.JBPMServiceLocator;
import org.jbpm.model.OpenProcessDefinition;
import org.jbpm.model.OpenExecution;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import java.util.*;
import java.io.InputStream;
@@ -40,7 +44,19 @@
public ProcessManagementImpl()
{
- this.processEngine = new Configuration().buildProcessEngine();
+ //JBPMService jbpmService = JBPMServiceLocator.locateService();
+ //this.processEngine = jbpmService.getProcessEngine();
+
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ this.processEngine = (ProcessEngine)ctx.lookup("java:/ProcessEngine");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to lookup process engine");
+ }
+
}
public List<ProcessDefinitionRef> getProcessDefinitions()
Modified: jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/enterprise/src/main/resources/jbpm.cfg.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- jBPM4 enterprise configuration.
- Uses different command service and environment config.
- (i.e. skips the TX interceptor)
+ jBPM4 configuration used within the AS.
+ Uses different command service and environment config.
-->
<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
@@ -15,23 +14,27 @@
<file extension=".jpdl.xml" type="jpdl" />
</assign-file-type>
<parse-jpdl />
- <check-process />
+ <check-process />
<check-problems />
- <save />
+ <save policy="org.jbpm.pvm.internal.wire.binding.VersionTimestampPolicy"/>
</deployer-manager>
<process-service />
<execution-service />
<management-service />
- <ejb-local-command-service>
- <home jndi-name="java:jbpm/CommandExecutor"/>
- </ejb-local-command-service>
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <!-- TODO: JBPM-2101 TX interceptor with 'required' semantics -->
+ </command-service>
<hibernate-configuration resource="hibernate.cfg.xml"/>
<hibernate-session-factory />
+ <job-executor auto-start="true" />
+
<id-generator />
<types resource="jbpm.pvm.types.xml" />
@@ -47,10 +50,12 @@
</process-engine-context>
<transaction-context>
- <hibernate-session current="true" />
+ <hibernate-session current="true"/>
<pvm-db-session />
<job-db-session />
- <ejb-timer-session />
+ <task-db-session />
+ <message-session />
+ <timer-session />
</transaction-context>
</jbpm-configuration>
Modified: jbpm4/trunk/modules/examples/jbpm4-examples.iml
===================================================================
--- jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -10,6 +10,8 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
@@ -168,15 +170,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:jbossesb-rosetta:jar:4.4.0.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/jbossesb-rosetta/4.4.0.GA/jbossesb-rosetta-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.cache:jbosscache-core:jar:3.0.2.GA:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/cache/jbosscache-core/3.0.2.GA/jbosscache-core-3.0.2.GA.jar!/" />
@@ -195,24 +188,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax-api:jar:1.0.1:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: juel:juel-engine:jar:2.1.0:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/juel/juel-engine/2.1.0/juel-engine-2.1.0.jar!/" />
@@ -258,15 +233,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax:jar:1.2.0:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: juel:juel:jar:2.1.0:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/juel/juel/2.1.0/juel-2.1.0.jar!/" />
@@ -352,54 +318,101 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:test-util:jar:4.4.0.GA:test">
+ <library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.10.GA:test">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/test-util/4.4.0.GA/test-util-4.4.0.GA.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar!/" />
</CLASSES>
<JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar!/" />
+ </CLASSES>
+ <JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.10.GA:test">
+ <library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:test">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:test">
+ <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:jbossesb-rosetta:jar:4.4.0.GA:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/jbossesb-rosetta/4.4.0.GA/jbossesb-rosetta-4.4.0.GA.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: jboss.jbossts:jbossts-common:jar:4.4.0.GA:test">
+ <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:test">
+ <library name="M2 Dep: stax:stax-api:jar:1.0.1:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar!/" />
</CLASSES>
<JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.codehaus.woodstox:wstx-lgpl:jar:3.2.6:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/codehaus/woodstox/wstx-lgpl/3.2.6/wstx-lgpl-3.2.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
<SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/codehaus/woodstox/wstx-lgpl/3.2.6/wstx-lgpl-3.2.6-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: stax:stax:jar:1.2.0:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:test-util:jar:4.4.0.GA:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/test-util/4.4.0.GA/test-util-4.4.0.GA.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: jboss.jbossts:jbossts-common:jar:4.4.0.GA:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Copied: jbpm4/trunk/modules/integration/jboss4 (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4)
Deleted: jbpm4/trunk/modules/integration/jboss4/pom.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/pom.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss4/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,69 +0,0 @@
-<?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">
- <modelVersion>4.0.0</modelVersion>
-
- <name>jBPM 4 - Integration JBoss 4</name>
- <description>JBoss jBPM - JBoss JBoss 4</description>
-
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jboss4</artifactId>
- <packaging>jar</packaging>
-
- <parent>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-integration</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <!-- Properties -->
- <properties>
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-spi</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-system-jmx</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <!-- Build -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <finalName>${project.build.finalName}</finalName>
- <appendAssemblyId>true</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-config.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/jbpm.beans/*</exclude>
- <exclude>**/jbpm.deployer/*</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Copied: jbpm4/trunk/modules/integration/jboss4/pom.xml (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/pom.xml)
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/pom.xml (rev 0)
+++ jbpm4/trunk/modules/integration/jboss4/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,69 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>jBPM 4 - Integration JBoss 4</name>
+ <description>JBoss jBPM - JBoss JBoss 4</description>
+
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jboss4</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-integration</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Build -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-config.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/jbpm.beans/*</exclude>
+ <exclude>**/jbpm.deployer/*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Copied: jbpm4/trunk/modules/integration/jboss4/scripts (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/scripts)
Deleted: jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/scripts/assembly-config.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,18 +0,0 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>config</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.outputDirectory}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/jboss-service.xml</include>
- <include>**/jboss-beans.xml</include>
- </includes>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
Copied: jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/scripts/assembly-config.xml)
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml (rev 0)
+++ jbpm4/trunk/modules/integration/jboss4/scripts/assembly-config.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,18 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>**/jboss-service.xml</include>
+ <include>**/jboss-beans.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Copied: jbpm4/trunk/modules/integration/jboss4/src (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java/org (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4 (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4)
Deleted: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,169 +0,0 @@
-/*
- * 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.jboss4;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.deployment.SubDeployer;
-import org.jboss.deployment.SubDeployerSupport;
-import org.jbpm.integration.spi.DeploymentAdaptor;
-import org.jbpm.integration.spi.JBPMDeploymentMetaData;
-import org.jbpm.integration.spi.ProcessDeploymentRef;
-import org.jbpm.internal.log.Log;
-
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-/**
- * An AS 4.2.x deployer for jBPM4 process archives.
- * Delegates to {@link org.jbpm.integration.spi.DeploymentAdaptor}.
- * The deployer retains a {@link org.jbpm.integration.spi.ProcessDeploymentRef}
- * for subsequent undeployment calls.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class JBPMDeployer extends SubDeployerSupport
- implements SubDeployer, JBPMDeployerMBean
-{
-
- private static final Log log = Log.getLog(JBPMDeployer.class.getName());
-
- private DeploymentAdaptor adaptor;
- private static final String ARCHIVE_SUFFIX = ".jpdl";
- private static final String JPDL_FILE_SUFFIX = ".jpdl.xml";
- private static final String CONTEXT_REFERENCE = "jbpm.deployer.reference";
-
- /**
- * Default CTOR used to set default values to the Suffixes and RelativeOrder
- * attributes. Those are read at subdeployer registration time by the MainDeployer
- * to alter its SuffixOrder.
- */
-
- public JBPMDeployer()
- {
- initializeMainDeployer();
- this.adaptor = new DeploymentAdaptor();
-
- System.out.println("Started JBPMDeployer");
- }
-
- /**
- * Set the suffixes and relative order attributes.
- *
- * Those are read at subdeployer registration time by the MainDeployer
- * to update its SuffixOrder list.
- */
- protected void initializeMainDeployer()
- {
- setSuffixes(new String[]{ARCHIVE_SUFFIX, JPDL_FILE_SUFFIX});
- setRelativeOrder(1000); // Make sure it kicks in after the other deployers
- }
-
- /**
- * Returns true if this deployer can deploy the given DeploymentInfo.
- *
- * @return True if this deployer can deploy the given DeploymentInfo.
- */
- public boolean accepts(DeploymentInfo di)
- {
- String urlStr = di.url.toString();
- return urlStr.endsWith(ARCHIVE_SUFFIX) || urlStr.endsWith(JPDL_FILE_SUFFIX);
- }
-
-
- public void init(DeploymentInfo deploymentInfo) throws DeploymentException
- {
- super.init(deploymentInfo);
- }
-
- public void create(DeploymentInfo deploymentInfo) throws DeploymentException
- {
- super.create(deploymentInfo);
- }
-
- public void start(DeploymentInfo rootDeployment) throws DeploymentException
- {
- if(rootDeployment.url.getFile().endsWith(ARCHIVE_SUFFIX))
- {
- log.info("Deploy " + rootDeployment.url);
-
- List<ProcessDeploymentRef> allProcessRefs = new ArrayList<ProcessDeploymentRef>();
-
- Iterator iterator = rootDeployment.subDeployments.iterator();
- while(iterator.hasNext())
- {
- DeploymentInfo subDeployment = (DeploymentInfo)iterator.next();
- JBPMDeploymentMetaData md = new JBPMDeploymentMetaData();
- md.setClassloader(subDeployment.localCl);
- md.setWatch(rootDeployment.watch);
- md.setProcessDescriptor(subDeployment.url);
-
- List<ProcessDeploymentRef> subDeploymentRefs = null;
-
- try
- {
- subDeploymentRefs = adaptor.deploy(md);
- allProcessRefs.addAll(subDeploymentRefs);
- }
- catch (Throwable e)
- {
- log.error("Failed to deploy " + rootDeployment.url, e);
- }
- }
-
- rootDeployment.context.put(CONTEXT_REFERENCE, allProcessRefs);
- }
- }
-
- public void destroy(DeploymentInfo deploymentInfo)
- {
- try
- {
- super.destroy(deploymentInfo);
- }
- catch (DeploymentException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public void stop(DeploymentInfo rootDeployment)
- {
- if(rootDeployment.url.getFile().endsWith(ARCHIVE_SUFFIX))
- {
- log.info("Undeploy " + rootDeployment.url);
-
- List<ProcessDeploymentRef> processRefs = (List<ProcessDeploymentRef>)
- rootDeployment.context.get(CONTEXT_REFERENCE);
-
- if(null==processRefs)
- {
- log.info("Failed to retrieve process reference information. " +
- "Ignore undepoyment call: "+ rootDeployment.url);
- return;
- }
-
- adaptor.undeploy(processRefs);
- }
- }
-}
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java)
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java (rev 0)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,169 @@
+/*
+ * 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.jboss4;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.SubDeployer;
+import org.jboss.deployment.SubDeployerSupport;
+import org.jbpm.integration.spi.DeploymentAdaptor;
+import org.jbpm.integration.spi.JBPMDeploymentMetaData;
+import org.jbpm.integration.spi.ProcessDeploymentRef;
+import org.jbpm.internal.log.Log;
+
+import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+/**
+ * An AS 4.2.x deployer for jBPM4 process archives.
+ * Delegates to {@link org.jbpm.integration.spi.DeploymentAdaptor}.
+ * The deployer retains a {@link org.jbpm.integration.spi.ProcessDeploymentRef}
+ * for subsequent undeployment calls.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPMDeployer extends SubDeployerSupport
+ implements SubDeployer, JBPMDeployerMBean
+{
+
+ private static final Log log = Log.getLog(JBPMDeployer.class.getName());
+
+ private DeploymentAdaptor adaptor;
+ private static final String ARCHIVE_SUFFIX = ".jpdl";
+ private static final String JPDL_FILE_SUFFIX = ".jpdl.xml";
+ private static final String CONTEXT_REFERENCE = "jbpm.deployer.reference";
+
+ /**
+ * Default CTOR used to set default values to the Suffixes and RelativeOrder
+ * attributes. Those are read at subdeployer registration time by the MainDeployer
+ * to alter its SuffixOrder.
+ */
+
+ public JBPMDeployer()
+ {
+ initializeMainDeployer();
+ this.adaptor = new DeploymentAdaptor();
+
+ System.out.println("Started JBPMDeployer");
+ }
+
+ /**
+ * Set the suffixes and relative order attributes.
+ *
+ * Those are read at subdeployer registration time by the MainDeployer
+ * to update its SuffixOrder list.
+ */
+ protected void initializeMainDeployer()
+ {
+ setSuffixes(new String[]{ARCHIVE_SUFFIX, JPDL_FILE_SUFFIX});
+ setRelativeOrder(1000); // Make sure it kicks in after the other deployers
+ }
+
+ /**
+ * Returns true if this deployer can deploy the given DeploymentInfo.
+ *
+ * @return True if this deployer can deploy the given DeploymentInfo.
+ */
+ public boolean accepts(DeploymentInfo di)
+ {
+ String urlStr = di.url.toString();
+ return urlStr.endsWith(ARCHIVE_SUFFIX) || urlStr.endsWith(JPDL_FILE_SUFFIX);
+ }
+
+
+ public void init(DeploymentInfo deploymentInfo) throws DeploymentException
+ {
+ super.init(deploymentInfo);
+ }
+
+ public void create(DeploymentInfo deploymentInfo) throws DeploymentException
+ {
+ super.create(deploymentInfo);
+ }
+
+ public void start(DeploymentInfo rootDeployment) throws DeploymentException
+ {
+ if(rootDeployment.url.getFile().endsWith(ARCHIVE_SUFFIX))
+ {
+ log.info("Deploy " + rootDeployment.url);
+
+ List<ProcessDeploymentRef> allProcessRefs = new ArrayList<ProcessDeploymentRef>();
+
+ Iterator iterator = rootDeployment.subDeployments.iterator();
+ while(iterator.hasNext())
+ {
+ DeploymentInfo subDeployment = (DeploymentInfo)iterator.next();
+ JBPMDeploymentMetaData md = new JBPMDeploymentMetaData();
+ md.setClassloader(subDeployment.localCl);
+ md.setWatch(rootDeployment.watch);
+ md.setProcessDescriptor(subDeployment.url);
+
+ List<ProcessDeploymentRef> subDeploymentRefs = null;
+
+ try
+ {
+ subDeploymentRefs = adaptor.deploy(md);
+ allProcessRefs.addAll(subDeploymentRefs);
+ }
+ catch (Throwable e)
+ {
+ log.error("Failed to deploy " + rootDeployment.url, e);
+ }
+ }
+
+ rootDeployment.context.put(CONTEXT_REFERENCE, allProcessRefs);
+ }
+ }
+
+ public void destroy(DeploymentInfo deploymentInfo)
+ {
+ try
+ {
+ super.destroy(deploymentInfo);
+ }
+ catch (DeploymentException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void stop(DeploymentInfo rootDeployment)
+ {
+ if(rootDeployment.url.getFile().endsWith(ARCHIVE_SUFFIX))
+ {
+ log.info("Undeploy " + rootDeployment.url);
+
+ List<ProcessDeploymentRef> processRefs = (List<ProcessDeploymentRef>)
+ rootDeployment.context.get(CONTEXT_REFERENCE);
+
+ if(null==processRefs)
+ {
+ log.info("Failed to retrieve process reference information. " +
+ "Ignore undepoyment call: "+ rootDeployment.url);
+ return;
+ }
+
+ adaptor.undeploy(processRefs);
+ }
+ }
+}
Deleted: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,77 +0,0 @@
-/*
- * 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.jboss4;
-
-import org.jboss.deployment.SubDeployerMBean;
-import org.jboss.mx.util.ObjectNameFactory;
-
-import javax.management.ObjectName;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface JBPMDeployerMBean extends SubDeployerMBean
-{
- public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("org.jbpm:JBPMDeployer");
-
- /**
- * Returns true if this deployer can deploy the given DeploymentInfo.
- * @return True if this deployer can deploy the given DeploymentInfo.
- */
- boolean accepts(org.jboss.deployment.DeploymentInfo di) ;
-
- /**
- * Describe <code>init</code> method here.
- * @param di a <code>DeploymentInfo</code> value
- * @throws org.jboss.deployment.DeploymentException if an error occurs
- */
- void init(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;
-
- /**
- * Describe <code>create</code> method here.
- * @param di a <code>DeploymentInfo</code> value
- * @throws org.jboss.deployment.DeploymentException if an error occurs
- */
- void create(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;
-
- /**
- * The <code>start</code> method starts all the mbeans in this DeploymentInfo..
- * @param di a <code>DeploymentInfo</code> value
- * @throws org.jboss.deployment.DeploymentException if an error occurs
- */
- void start(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;
-
- /**
- * Undeploys the package at the url string specified. This will: Undeploy packages depending on this one. Stop, destroy,
- * and unregister all the specified mbeans Unload this package and packages this package deployed via the classpath tag.
- * Keep track of packages depending on this one that we undeployed so that they can be redeployed should this one be redeployed
- * @param di the <code>DeploymentInfo</code> value to stop.
- */
- void stop(org.jboss.deployment.DeploymentInfo di) ;
-
- /**
- * Describe <code>destroy</code> method here.
- * @param di a <code>DeploymentInfo</code> value
- */
- void destroy(org.jboss.deployment.DeploymentInfo di) ;
-
-}
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java)
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java (rev 0)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployerMBean.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,77 @@
+/*
+ * 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.jboss4;
+
+import org.jboss.deployment.SubDeployerMBean;
+import org.jboss.mx.util.ObjectNameFactory;
+
+import javax.management.ObjectName;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface JBPMDeployerMBean extends SubDeployerMBean
+{
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("org.jbpm:JBPMDeployer");
+
+ /**
+ * Returns true if this deployer can deploy the given DeploymentInfo.
+ * @return True if this deployer can deploy the given DeploymentInfo.
+ */
+ boolean accepts(org.jboss.deployment.DeploymentInfo di) ;
+
+ /**
+ * Describe <code>init</code> method here.
+ * @param di a <code>DeploymentInfo</code> value
+ * @throws org.jboss.deployment.DeploymentException if an error occurs
+ */
+ void init(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;
+
+ /**
+ * Describe <code>create</code> method here.
+ * @param di a <code>DeploymentInfo</code> value
+ * @throws org.jboss.deployment.DeploymentException if an error occurs
+ */
+ void create(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;
+
+ /**
+ * The <code>start</code> method starts all the mbeans in this DeploymentInfo..
+ * @param di a <code>DeploymentInfo</code> value
+ * @throws org.jboss.deployment.DeploymentException if an error occurs
+ */
+ void start(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;
+
+ /**
+ * Undeploys the package at the url string specified. This will: Undeploy packages depending on this one. Stop, destroy,
+ * and unregister all the specified mbeans Unload this package and packages this package deployed via the classpath tag.
+ * Keep track of packages depending on this one that we undeployed so that they can be redeployed should this one be redeployed
+ * @param di the <code>DeploymentInfo</code> value to stop.
+ */
+ void stop(org.jboss.deployment.DeploymentInfo di) ;
+
+ /**
+ * Describe <code>destroy</code> method here.
+ * @param di a <code>DeploymentInfo</code> value
+ */
+ void destroy(org.jboss.deployment.DeploymentInfo di) ;
+
+}
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.beans)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF)
Deleted: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,18 +0,0 @@
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
-
- <!--
- 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>
-
- <bean name="org.jbpm:service=ProcessEngine"
- class="org.jbpm.integration.spi.JBPMServiceImpl"/>
-
-</deployment>
\ No newline at end of file
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml)
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml (rev 0)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.beans/META-INF/jboss-beans.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,18 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+ xmlns="urn:jboss:bean-deployer">
+
+ <!--
+ 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>
+
+ <bean name="org.jbpm:service=ProcessEngine"
+ class="org.jbpm.integration.spi.JBPMServiceImpl"/>
+
+</deployment>
\ No newline at end of file
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.deployer)
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF)
Deleted: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: jboss-service.xml 44143 2006-04-24 18:19:21Z kkhan $ -->
-
-<!-- ===================================================================== -->
-<!-- JBoss Server Configuration -->
-<!-- ===================================================================== -->
-
-<server>
-
- <mbean code="org.jbpm.integration.jboss4.JBPMDeployer"
- name="org.jbpm:service=JBPMDeployer">
- </mbean>
-
-</server>
Copied: jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml)
===================================================================
--- jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml (rev 0)
+++ jbpm4/trunk/modules/integration/jboss4/src/main/resources/jbpm.deployer/META-INF/jboss-service.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: jboss-service.xml 44143 2006-04-24 18:19:21Z kkhan $ -->
+
+<!-- ===================================================================== -->
+<!-- JBoss Server Configuration -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <mbean code="org.jbpm.integration.jboss4.JBPMDeployer"
+ name="org.jbpm:service=JBPMDeployer">
+ </mbean>
+
+</server>
Modified: jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/integration-jboss5.iml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -9,7 +9,10 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="integration-spi" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.identity:idm-spi:jar:1.0.0-SNAPSHOT:compile">
<CLASSES>
@@ -185,15 +188,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax-api:jar:1.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/stax/stax-api/1.0/stax-api-1.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar!/" />
@@ -321,15 +315,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax:jar:1.2.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: jgroups:jgroups:jar:2.6.7.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/jgroups/jgroups/2.6.7.GA/jgroups-2.6.7.GA.jar!/" />
@@ -381,15 +366,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:test-util:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/test-util/4.4.0.GA/test-util-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss:jbossxb:jar:2.0.0.GA:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA.jar!/" />
@@ -519,15 +495,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.apache.ant:ant-junit:jar:1.7.0:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar!/" />
@@ -839,15 +806,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:jbossesb-rosetta:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/jbossesb-rosetta/4.4.0.GA/jbossesb-rosetta-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
@@ -1086,15 +1044,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: jboss.jbossts:jbossts-common:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.jpa:jboss-jpa-deployers:jar:0.1.2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/jpa/jboss-jpa-deployers/0.1.2/jboss-jpa-deployers-0.1.2.jar!/" />
@@ -1145,6 +1094,15 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: stax:stax-api:jar:1.0:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/stax/stax-api/1.0/stax-api-1.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: jbpm4/trunk/modules/integration/jboss5/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/pom.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -60,6 +60,7 @@
<excludes>
<exclude>META-INF/jbpm-service-jboss-beans.xml</exclude>
<exclude>META-INF/jbpm-deployers-jboss-beans.xml</exclude>
+ <exclude>META-INF/jbpm.deployer.cfg.xml</exclude>
</excludes>
</configuration>
</plugin>
Modified: jbpm4/trunk/modules/integration/jboss5/scripts/assembly-config.xml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/scripts/assembly-config.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/scripts/assembly-config.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -11,6 +11,7 @@
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*beans.xml</include>
+ <include>**/jbpm.deployer.cfg.xml</include>
</includes>
</fileSet>
</fileSets>
Modified: jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -21,43 +21,66 @@
*/
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.integration.spi.DeploymentAdaptor;
+import org.jbpm.integration.spi.JBPMDeploymentMetaData;
+import org.jbpm.integration.spi.ProcessDeploymentRef;
+import org.jbpm.internal.log.Log;
-import org.jbpm.integration.spi.JBPMService;
-import org.jbpm.integration.util.KernelAwareSPIFactory;
+import java.util.List;
/**
- * Deploys JBPM processes and associates a classloader.
+ * An AS 5.0.x deployer for jBPM4 process archives.
+ * Delegates to {@link org.jbpm.integration.spi.DeploymentAdaptor}.
+ * The deployer retains a {@link org.jbpm.integration.spi.ProcessDeploymentRef}
+ * for subsequent undeployment calls.
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class JBPMDeployer extends AbstractSimpleVFSRealDeployer<JBPMDeploymentMetaData>
{
+ private static final Log log = Log.getLog(JBPMDeployer.class.getName());
+
+ private DeploymentAdaptor adaptor;
+
public JBPMDeployer()
{
super(JBPMDeploymentMetaData.class);
+ this.adaptor = new DeploymentAdaptor();
}
public void deploy(VFSDeploymentUnit unit, JBPMDeploymentMetaData deployment)
throws DeploymentException
{
- System.out.println("*** JBPM : Working on " + deployment);
+ log.info("Deploy " + deployment);
+
+ // associate classloader
+ deployment.setClassloader(unit.getClassLoader());
- JBPMService jbpmService = new KernelAwareSPIFactory().getKernelProvidedSPI(
- "org.jbpm:service=ProcessEngine", JBPMService.class
- );
+ List<ProcessDeploymentRef> processRefs = adaptor.deploy(deployment);
- System.out.println("*** JBPM Service: " + jbpmService);
+ // TODO: mark the process 'ready', classloader assoc
+ unit.addAttachment("jbpm.deployer.reference", processRefs);
+
}
public void undeploy(DeploymentUnit unit, JBPMDeploymentMetaData deployment)
{
- System.out.println("*** JBPM : Undeploy "+deployment);
-
- super.undeploy(unit, deployment);
+ log.info("Undeploy "+deployment);
+
+ List<ProcessDeploymentRef> processRefs =
+ (List<ProcessDeploymentRef>)unit.getAttachment("jbpm.deployer.reference");
+
+ if(null==processRefs)
+ {
+ log.info("Failed to retrieve process reference information. Ignore undepoyment call: "+ deployment);
+ return;
+ }
+
+ adaptor.undeploy(processRefs);
}
}
Deleted: jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeploymentMetaData.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,29 +0,0 @@
-/*
- * 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.jboss5;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class JBPMDeploymentMetaData
-{
-}
Modified: jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMMetaDataDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -24,26 +24,35 @@
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.virtual.VirtualFile;
+import org.jbpm.internal.log.Log;
+import org.jbpm.integration.spi.JBPMDeploymentMetaData;
/**
- * Prepares {@link org.jbpm.integration.jboss5.JBPMDeploymentMetaData}
+ * Prepares {@link org.jbpm.integration.spi.JBPMDeploymentMetaData}
+ * which will be consumed by {@link org.jbpm.integration.jboss5.JBPMDeployer}
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
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.setWatch(unit.getTopLevel().getRoot().toURL());
- return new JBPMDeploymentMetaData();
+ return md;
}
}
Deleted: jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMServiceImpl.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -1,51 +0,0 @@
-/*
- * 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.jboss5;
-
-import org.jbpm.integration.spi.JBPMService;
-import org.jbpm.ProcessEngine;
-import org.jbpm.Configuration;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class JBPMServiceImpl implements JBPMService
-{
- private ProcessEngine processEngine;
-
- public void start()
- {
- this.processEngine = new Configuration().buildProcessEngine();
- System.out.println("** JBPMService started: " + this.processEngine);
- }
-
- public void stop()
- {
- this.processEngine = null;
- System.out.println("** JBPMService stopped");
- }
-
- public ProcessEngine getProcessEngine()
- {
- return this.processEngine;
- }
-}
Modified: jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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
Modified: jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-service-jboss-beans.xml
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-service-jboss-beans.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm-service-jboss-beans.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -5,5 +5,7 @@
<!--
JBPM Service
-->
- <bean name="org.jbpm:service=ProcessEngine" class="org.jbpm.integration.jboss5.JBPMServiceImpl"/>
+ <bean name="org.jbpm:service=ProcessEngine"
+ class="org.jbpm.integration.spi.JBPMServiceImpl"/>
+
</deployment>
\ No newline at end of file
Copied: jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm.deployer.cfg.xml (from rev 4224, jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm.deployer.cfg.xml)
===================================================================
--- jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm.deployer.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/integration/jboss5/src/main/resources/META-INF/jbpm.deployer.cfg.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ jBPM4 deployer configuration.
+ The deployer deals with the transaction management on it's own.
+ (UserTransaction)
+-->
+
+<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
+
+ <process-engine-context>
+
+ <deployer-manager>
+ <assign-file-type>
+ <file extension=".jpdl.xml" type="jpdl" />
+ </assign-file-type>
+ <parse-jpdl />
+ <check-process /> <!--Covered by VersionTimestampPolicy -->
+ <check-problems />
+ <save policy="org.jbpm.pvm.internal.wire.binding.VersionTimestampPolicy"/>
+ </deployer-manager>
+
+ <process-service />
+ <execution-service />
+ <management-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ </command-service>
+
+ <hibernate-configuration resource="hibernate.cfg.xml"/>
+
+ <hibernate-session-factory />
+
+ <id-generator />
+ <types resource="jbpm.pvm.types.xml" />
+
+ <business-calendar>
+ <monday hours="9:00-12:00 and 12:30-17:00"/>
+ <tuesday hours="9:00-12:00 and 12:30-17:00"/>
+ <wednesday hours="9:00-12:00 and 12:30-17:00"/>
+ <thursday hours="9:00-12:00 and 12:30-17:00"/>
+ <friday hours="9:00-12:00 and 12:30-17:00"/>
+ <holiday period="01/07/2008 - 31/08/2008"/>
+ </business-calendar>
+
+ </process-engine-context>
+
+ <transaction-context>
+ <hibernate-session current="true"/>
+ <pvm-db-session />
+ <job-db-session />
+ <ejb-timer-session />
+ </transaction-context>
+
+</jbpm-configuration>
Modified: jbpm4/trunk/modules/integration/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/pom.xml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/pom.xml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -119,6 +119,7 @@
<modules>
<module>spi</module>
<module>jboss5</module>
+ <module>jboss4</module>
</modules>
</project>
Modified: jbpm4/trunk/modules/integration/spi/integration-spi.iml
===================================================================
--- jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -9,7 +9,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
<CLASSES>
@@ -65,15 +67,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:jbossesb-rosetta:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/jbossesb-rosetta/4.4.0.GA/jbossesb-rosetta-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: commons-logging:commons-logging:jar:1.0.4:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/" />
@@ -110,24 +103,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax-api:jar:1.0.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: juel:juel-engine:jar:2.1.0:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/juel/juel-engine/2.1.0/juel-engine-2.1.0.jar!/" />
@@ -173,15 +148,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax:jar:1.2.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: juel:juel:jar:2.1.0:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/juel/juel/2.1.0/juel-2.1.0.jar!/" />
@@ -303,15 +269,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:test-util:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/test-util/4.4.0.GA/test-util-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
@@ -330,15 +287,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: jboss.jbossts:jbossts-common:jar:4.4.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
@@ -1143,6 +1091,15 @@
</SOURCES>
</library>
</orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: stax:stax-api:jar:1.0:provided">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/stax/stax-api/1.0/stax-api-1.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,155 @@
+/*
+ * 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.Deployment;
+import org.jbpm.ProcessDefinition;
+import org.jbpm.ProcessService;
+import org.jbpm.internal.log.Log;
+
+import javax.naming.InitialContext;
+import javax.transaction.SystemException;
+import javax.transaction.UserTransaction;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Adopts AS 4 and AS 5 deployer invocations to jBPM invocations.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DeploymentAdaptor
+{
+ private static final Log log = Log.getLog(DeploymentAdaptor.class.getName());
+
+ public List<ProcessDeploymentRef> deploy(JBPMDeploymentMetaData deploymentMetData)
+ {
+ JBPMService jbpmService = JBPMServiceLocator.locateService();
+
+ 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 = deploymentMetData.getWatch().getPath();
+ File deploymentFile = new File(pathToDeployment);
+
+ Deployment dpl = processService.createDeployment()
+ .addUrl(deploymentMetData.getProcessDescriptor())
+ .addObject("jbpmdeployer.deploymentArtifact.timestamp", Long.valueOf(deploymentFile.lastModified()))
+ .addObject("jbpmdeployer.deploymentArtifact.location", deploymentMetData.getWatch().getPath());
+
+ List<ProcessDefinition> processesInScope =
+ dpl
+ .deploy()
+ .getProcessDefinitions();
+
+ // pass reference to the deployment unit for undeployment
+ List<ProcessDeploymentRef> processRefs = new ArrayList<ProcessDeploymentRef>();
+ for(ProcessDefinition pd : processesInScope)
+ {
+ ProcessDeploymentRef ref = new ProcessDeploymentRef(
+ pd.getId(),
+ pd.getVersion(),
+ deploymentMetData.getWatch().getPath()
+ );
+ processRefs.add(ref);
+ }
+
+ tx.commit();
+
+ return processRefs;
+
+ }
+ catch(Throwable e)
+ {
+ if(tx!=null)
+ {
+ try
+ {
+ tx.rollback();
+ }
+ catch (SystemException e1) {}
+ }
+
+ throw new RuntimeException("Failed to deploy process", e);
+ }
+
+ }
+
+ public void undeploy(List<ProcessDeploymentRef> processRefs)
+ {
+ UserTransaction tx = null;
+
+ try
+ {
+
+ JBPMService jbpmService = JBPMServiceLocator.locateService();
+ ProcessService processService = jbpmService.getProcessEngine().getProcessService();
+
+ InitialContext ctx = new InitialContext();
+ tx = (UserTransaction)ctx.lookup("UserTransaction");
+
+ tx.begin();
+
+ for(ProcessDeploymentRef ref : processRefs)
+ {
+ // if the physical artifact has been removed the process can be deleted
+ File deploymentArtifact = new File(ref.getLocation());
+ if(!deploymentArtifact.exists())
+ {
+ log.info("The deployment artifact for process '"+ref+" has been removed."+
+ " The process will be deleted");
+
+ processService.deleteProcessDefinition(ref.getProcessId());
+ }
+ else
+ {
+ // TODO: if the file reamains, mark the process as 'shutdown'
+ }
+ }
+
+ tx.commit();
+
+ }
+ catch(Throwable e)
+ {
+ if(tx!=null)
+ {
+ try
+ {
+ tx.rollback();
+ }
+ catch (SystemException e1) {}
+ }
+
+ throw new RuntimeException("Failed to undeploy process", e);
+ }
+ }
+}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMDeploymentMetaData.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMDeploymentMetaData.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMDeploymentMetaData.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMDeploymentMetaData.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,69 @@
+/*
+ * 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 java.net.URL;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPMDeploymentMetaData
+{
+ private URL watch;
+ private URL processDescriptor;
+ private ClassLoader classloader;
+
+ public void setProcessDescriptor(URL processDescriptor)
+ {
+ this.processDescriptor = processDescriptor;
+ }
+
+ public void setWatch(URL watch)
+ {
+ this.watch = watch;
+ }
+
+ public void setClassloader(ClassLoader classloader)
+ {
+ this.classloader = classloader;
+ }
+
+ public URL getWatch()
+ {
+ return watch;
+ }
+
+ public URL getProcessDescriptor()
+ {
+ return processDescriptor;
+ }
+
+ public ClassLoader getClassloader()
+ {
+ return classloader;
+ }
+
+ public String toString()
+ {
+ return "JBPMDeploymentMetaData {unit="+ watch +", jpdl="+processDescriptor+", cl="+classloader+"}";
+ }
+}
Modified: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMService.java
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMService.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMService.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -24,14 +24,14 @@
import org.jbpm.ProcessEngine;
/**
- * A JBPM service implementation
- *
+ * A JBPM service implementation that will be installed into the AS kernel.
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface JBPMService
-{
+{
void start();
void stop();
-
+
ProcessEngine getProcessEngine();
}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceImpl.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceImpl.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceImpl.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceImpl.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,68 @@
+/*
+ * 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.Configuration;
+import org.jbpm.ProcessEngine;
+import org.jbpm.internal.log.Log;
+
+import javax.naming.InitialContext;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class JBPMServiceImpl implements JBPMService
+{
+ private static final Log log = Log.getLog(JBPMServiceImpl.class.getName());
+
+ private final static String DEFAULT_JNDI_NAME = "java:/ProcessEngine";
+
+ private ProcessEngine processEngine;
+
+ public void start()
+ {
+ this.processEngine = new Configuration().buildProcessEngine();
+
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ ctx.bind(DEFAULT_JNDI_NAME, new ProcessEngineReference("default", this.processEngine));
+ log.info("ProcessEngine bound to: " + DEFAULT_JNDI_NAME);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to create JBPMService", e);
+ }
+
+ }
+
+ public void stop()
+ {
+ this.processEngine = null;
+ log.info("JBPMService stopped");
+ }
+
+ public ProcessEngine getProcessEngine()
+ {
+ return this.processEngine;
+ }
+}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/JBPMServiceLocator.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,47 @@
+/*
+ * 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;
+
+/**
+ * Locates a {@link org.jbpm.integration.spi.JBPMService}
+ * through the {@link 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
+ );
+ }
+}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessDeploymentRef.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,61 @@
+/*
+ * 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;
+
+/**
+ * Retains with a deployer for undeployment calls.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public final class ProcessDeploymentRef
+{
+ private String processId;
+ private int version;
+ private String location;
+
+ public ProcessDeploymentRef(String processId, int version, String location)
+ {
+ this.processId = processId;
+ this.version = version;
+ this.location = location;
+ }
+
+ public String toString()
+ {
+ return "ProcessDeploymentRef {id="+processId+", version="+version+", location="+location+"}";
+ }
+
+ public String getProcessId()
+ {
+ return processId;
+ }
+
+ public int getVersion()
+ {
+ return version;
+ }
+
+ public String getLocation()
+ {
+ return location;
+ }
+}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineObjectFactory.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineObjectFactory.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineObjectFactory.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineObjectFactory.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,54 @@
+/*
+ * 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.ProcessEngine;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+import java.util.Hashtable;
+
+/**
+ * Constructs a {@link org.jbpm.ProcessEngine} on the JNDI client side.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessEngineObjectFactory implements ObjectFactory
+{
+ public Object getObjectInstance(
+ Object obj, Name name,
+ Context nameCtx, Hashtable<?, ?> environment) throws Exception
+ {
+ if (obj instanceof Reference) {
+ Reference ref = (Reference)obj;
+ if (ref.getClassName().equals(ProcessEngine.class.getName())) {
+ RefAddr engineName = ref.get(ProcessEngineReference.ENGINE_NAME); // currently not used
+ return JBPMServiceLocator.locateService().getProcessEngine();
+ }
+ }
+
+ return null;
+ }
+}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineReference.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineReference.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineReference.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/ProcessEngineReference.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,58 @@
+/*
+ * 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.ProcessEngine;
+
+import javax.naming.Referenceable;
+import javax.naming.Reference;
+import javax.naming.NamingException;
+import javax.naming.StringRefAddr;
+
+/**
+ * Stored in JNDI. Will be used to reference a {@link org.jbpm.ProcessEngine}
+ * when the {@link org.jbpm.integration.spi.ProcessEngineObjectFactory} is invoked.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessEngineReference implements Referenceable
+{
+ private String name;
+ private transient ProcessEngine processEngine;
+ public static final String ENGINE_NAME = "process.engine.name";
+
+ public ProcessEngineReference(String name, ProcessEngine processEngine)
+ {
+ this.name = name;
+ this.processEngine = processEngine;
+ }
+
+ public Reference getReference() throws NamingException
+ {
+ return new Reference(
+ ProcessEngine.class.getName(),
+ new StringRefAddr(ProcessEngineReference.ENGINE_NAME, this.name),
+ ProcessEngineObjectFactory.class.getName(),
+ null
+ );
+ }
+}
Copied: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java (from rev 4224, jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java)
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java (rev 0)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -0,0 +1,57 @@
+/*
+ * 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.util;
+
+import java.util.Iterator;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+/**
+ * Locate the single instance of the MBeanServer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 30-Jul-2007
+ */
+public class MBeanServerLocator
+{
+ private MBeanServer mbeanServer;
+
+ public MBeanServer getMbeanServer()
+ {
+ // In jboss-4.2 the MBeanServer cannot be injected
+ if (mbeanServer == null)
+ {
+ for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext();)
+ {
+ mbeanServer = (MBeanServer)i.next();
+ break;
+ }
+ }
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/deploy/SaveDeployer.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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
*/
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java (from rev 4224, jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/PolicyEvaluation.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SaveBinding.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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);
}
}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java (from rev 4224, jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/SavePolicy.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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);
+}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java (from rev 4224, jbpm4/branches/hbraun/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/VersionTimestampPolicy.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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 DeploymentAdaptor, it provides the timestamp
+ long currentTimestamp = (Long)deployment.getObject(DEPLOYER_TIMESTAMP);
+ String deloymentLocation = (String)deployment.getObject(DEPLOYER_LOCATION);
+
+ // provide evaluation properties
+ evaluation.getResults().put(DEPLOYER_TIMESTAMP, String.valueOf(currentTimestamp));
+ evaluation.getResults().put(DEPLOYER_LOCATION, deloymentLocation);
+
+ // 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/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Binding.java 2009-03-11 10:11:59 UTC (rev 4225)
@@ -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.
Modified: jbpm4/trunk/modules/test-db/jbpm4-test-db.iml
===================================================================
--- jbpm4/trunk/modules/test-db/jbpm4-test-db.iml 2009-03-10 20:07:45 UTC (rev 4224)
+++ jbpm4/trunk/modules/test-db/jbpm4-test-db.iml 2009-03-11 10:11:59 UTC (rev 4225)
@@ -14,7 +14,9 @@
<orderEntry type="module" module-name="jbpm4-test-base" exported="" />
<orderEntry type="module" module-name="jbpm4-task" exported="" />
<orderEntry type="module" module-name="jbpm4-toplevel" exported="" />
- <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="toplevel" exported="" />
+ <orderEntry type="module" module-name="jpdl" exported="" />
+ <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
@@ -34,15 +36,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:jbossesb-rosetta:jar:4.4.0.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/jbossesb-rosetta/4.4.0.GA/jbossesb-rosetta-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
@@ -61,24 +54,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax-api:jar:1.0.1:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.client:jbossall-client:jar:4.2.2.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/client/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: antlr:antlr:jar:2.7.6:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
@@ -97,15 +72,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: stax:stax:jar:1.2.0:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: jboss:jboss-j2ee:jar:4.2.2.GA:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jboss-j2ee/4.2.2.GA/jboss-j2ee-4.2.2.GA.jar!/" />
@@ -162,15 +128,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm4.dependencies.esb:test-util:jar:4.4.0.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm4/dependencies/esb/test-util/4.4.0.GA/test-util-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
@@ -180,15 +137,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: jboss.jbossts:jbossts-common:jar:4.4.0.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/jboss/jbossts/jbossts-common/4.4.0.GA/jbossts-common-4.4.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: log4j:log4j:jar:1.2.14:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
17 years, 1 month
JBoss JBPM SVN: r4224 - jbpm3/branches/jbpm-3.2.6.SP/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-03-10 16:07:45 -0400 (Tue, 10 Mar 2009)
New Revision: 4224
Modified:
jbpm3/branches/jbpm-3.2.6.SP/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java
Log:
JBPM-2093: stabilize EjbSchedulerTest under MySQL
Modified: jbpm3/branches/jbpm-3.2.6.SP/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.SP/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java 2009-03-10 19:30:40 UTC (rev 4223)
+++ jbpm3/branches/jbpm-3.2.6.SP/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java 2009-03-10 20:07:45 UTC (rev 4224)
@@ -32,7 +32,6 @@
import org.jbpm.graph.def.Event;
import org.jbpm.graph.def.EventCallback;
import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.graph.exe.Token;
import org.jbpm.scheduler.ejbtimer.EntitySchedulerService;
/**
@@ -121,6 +120,9 @@
+ " </start-state>"
+ " <state name='a'>"
+ " <timer duedate='1 second' repeat='1 second' />"
+ + " <transition to='b' />"
+ + " </state>"
+ + " <state name='b'>"
+ " <transition to='end' />"
+ " </state>"
+ " <end-state name='end' />"
@@ -135,16 +137,18 @@
assertEquals("a", getProcessInstanceState(processInstanceId));
// cancel timer
long rootTokenId = processInstance.getRootToken().getId();
- cancelTimer("a", rootTokenId);
+ signalToken(rootTokenId);
// no more expirations
try {
- EventCallback.waitForEvent(Event.EVENTTYPE_TIMER, 2000);
+ EventCallback.waitForEvent(Event.EVENTTYPE_TIMER, 1000);
+ System.out.println("canceled timer fired again, probably due to race condition");
+ EventCallback.waitForEvent(Event.EVENTTYPE_TIMER, 1000);
fail("expected timeout exception");
}
catch (org.jbpm.JbpmException e) {
// timeout exception was expected
}
-
+ // proceed to end state
signalToken(rootTokenId);
assertTrue("expected process instance " + processInstanceId + " to have ended",
hasProcessInstanceEnded(processInstanceId));
@@ -162,23 +166,23 @@
+ " <transition to='a' />"
+ " </start-state>"
+ " <state name='a'>"
- + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <timer duedate='1 second' transition='timeout' />"
+ " <transition name='timeout' to='b' />"
+ " </state>"
+ " <state name='b'>"
- + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <timer duedate='1 second' transition='timeout' />"
+ " <transition name='timeout' to='c' />"
+ " </state>"
+ " <state name='c'>"
- + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <timer duedate='1 second' transition='timeout' />"
+ " <transition name='timeout' to='d' />"
+ " </state>"
+ " <state name='d'>"
- + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <timer duedate='1 second' transition='timeout' />"
+ " <transition name='timeout' to='e' />"
+ " </state>"
+ " <state name='e'>"
- + " <timer duedate='500 milliseconds' transition='timeout' />"
+ + " <timer duedate='1 second' transition='timeout' />"
+ " <transition name='timeout' to='end' />"
+ " </state>"
+ " <end-state name='end' />"
@@ -209,7 +213,7 @@
+ " <transition name='e' to='e' />"
+ " </fork>"
+ " <state name='a'>"
- + " <timer duedate='0.5 seconds' transition='timeout' />"
+ + " <timer duedate='0 seconds' transition='timeout' />"
+ " <transition name='timeout' to='j' />"
+ " </state>"
+ " <state name='b'>"
@@ -217,15 +221,15 @@
+ " <transition name='timeout' to='j' />"
+ " </state>"
+ " <state name='c'>"
- + " <timer duedate='1.5 seconds' transition='timeout' />"
+ + " <timer duedate='2 seconds' transition='timeout' />"
+ " <transition name='timeout' to='j' />"
+ " </state>"
+ " <state name='d'>"
- + " <timer duedate='2 seconds' transition='timeout' />"
+ + " <timer duedate='3 seconds' transition='timeout' />"
+ " <transition name='timeout' to='j' />"
+ " </state>"
+ " <state name='e'>"
- + " <timer duedate='2.5 second' transition='timeout' />"
+ + " <timer duedate='4 seconds' transition='timeout' />"
+ " <transition name='timeout' to='j' />"
+ " </state>"
+ " <join name='j' async='exclusive' lock='UPGRADE'>"
@@ -244,23 +248,12 @@
private static final long serialVersionUID = 1L;
public Object execute(JbpmContext jbpmContext) throws Exception {
- return jbpmContext.loadProcessInstance(processInstanceId)
+ return jbpmContext
+ .loadProcessInstance(processInstanceId)
.getRootToken()
.getNode()
.getName();
}
});
}
-
- private void cancelTimer(final String timerName, final long tokenId) throws RemoteException {
- commandService.execute(new Command() {
- private static final long serialVersionUID = 1L;
-
- public Object execute(JbpmContext jbpmContext) throws Exception {
- Token token = jbpmContext.loadToken(tokenId);
- jbpmContext.getServices().getSchedulerService().deleteTimersByName(timerName, token);
- return null;
- }
- });
- }
}
17 years, 1 month
JBoss JBPM SVN: r4223 - jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-03-10 15:30:40 -0400 (Tue, 10 Mar 2009)
New Revision: 4223
Modified:
jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml
Log:
added some more comments
Modified: jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml
===================================================================
--- jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml 2009-03-10 19:25:36 UTC (rev 4222)
+++ jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml 2009-03-10 19:30:40 UTC (rev 4223)
@@ -39,6 +39,7 @@
<property name="transactionManager" ref="transactionManager" />
</bean>
+ <!-- Start the jobExecutor -->
<bean id="jobExecutor" class="org.jbpm.pvm.internal.jobexecutor.JobExecutor" init-method="start" destroy-method="stop">
<property name="commandExecutor" ref="commandService" />
</bean>
17 years, 1 month
JBoss JBPM SVN: r4222 - in jbpm4/branches/ainze/modules: spring/src/main/java/org/jbpm/spring/cfg and 3 other directories.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-03-10 15:25:36 -0400 (Tue, 10 Mar 2009)
New Revision: 4222
Added:
jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/hibernate.jbpm.cfg.xml
Removed:
jbpm4/branches/ainze/modules/spring/src/test/java/org/jbpm/spring/test/mgmt/
Modified:
jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/SpringCommandService.java
jbpm4/branches/ainze/modules/spring/src/main/java/org/jbpm/spring/cfg/SpringConfigurationFactoryBean.java
jbpm4/branches/ainze/modules/spring/src/test/java/org/jbpm/spring/test/activities/ExclusiveTest.java
jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml
jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/jbpm.cfg.xml
Log:
added transactional command service and reworked the sessionFactory
Modified: jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/SpringCommandService.java
===================================================================
--- jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/SpringCommandService.java 2009-03-10 19:24:46 UTC (rev 4221)
+++ jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/SpringCommandService.java 2009-03-10 19:25:36 UTC (rev 4222)
@@ -21,38 +21,46 @@
*/
package org.jbpm.pvm.internal.spring;
-import org.hibernate.Session;
+import org.apache.commons.lang.StringUtils;
import org.jbpm.cmd.Command;
import org.jbpm.cmd.CommandService;
-import org.jbpm.env.Environment;
import org.jbpm.env.EnvironmentFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
import org.springframework.orm.hibernate3.HibernateTransactionManager;
-import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.transaction.support.TransactionTemplate;
-
/**
- * @author Tom Baeyens
+ * CommandService which uses the Spring TransactionTemplate
+ * to wrap any command into a transaction.
+ *
+ * @author Andries Inze
*/
-public class SpringCommandService implements CommandService {
-
- TransactionTemplate transactionTemplate;
- EnvironmentFactory environmentFactory;
-
- public void setEnvironmentFactory(EnvironmentFactory environmentFactory) {
- this.environmentFactory = environmentFactory;
- }
+public class SpringCommandService implements CommandService,
+ ApplicationContextAware {
- public void setTransactionManager(HibernateTransactionManager transactionManager) {
- this.transactionTemplate = new TransactionTemplate(transactionManager);
- }
-
- public <T> T execute(Command<T> command) {
- return (T) transactionTemplate.execute(
- new CommandTransactionCallback(command, environmentFactory)
- );
- }
-
-
+ private TransactionTemplate transactionTemplate;
+ private String configurationBeanName;
+ private ApplicationContext applicationContext;
+ @SuppressWarnings("unchecked")
+ public <T> T execute(Command<T> command) {
+ return (T) transactionTemplate.execute(new CommandTransactionCallback(
+ command, (EnvironmentFactory) applicationContext
+ .getBean(StringUtils.defaultIfEmpty(
+ configurationBeanName, "configuration"))));
+ }
+
+ public void setTransactionManager(
+ HibernateTransactionManager transactionManager) {
+ this.transactionTemplate = new TransactionTemplate(transactionManager);
+ }
+
+ public void setApplicationContext(ApplicationContext applicationContext) {
+ this.applicationContext = applicationContext;
+ }
+
+ public void setConfigurationBeanName(String configurationBeanName) {
+ this.configurationBeanName = configurationBeanName;
+ }
}
Modified: jbpm4/branches/ainze/modules/spring/src/main/java/org/jbpm/spring/cfg/SpringConfigurationFactoryBean.java
===================================================================
--- jbpm4/branches/ainze/modules/spring/src/main/java/org/jbpm/spring/cfg/SpringConfigurationFactoryBean.java 2009-03-10 19:24:46 UTC (rev 4221)
+++ jbpm4/branches/ainze/modules/spring/src/main/java/org/jbpm/spring/cfg/SpringConfigurationFactoryBean.java 2009-03-10 19:25:36 UTC (rev 4222)
@@ -4,6 +4,7 @@
package org.jbpm.spring.cfg;
import org.hibernate.SessionFactory;
+import org.jbpm.cmd.CommandService;
import org.jbpm.pvm.internal.cfg.SpringConfiguration;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.FactoryBean;
@@ -20,13 +21,20 @@
private String jbpmConfigurationLocation;
private SessionFactory sessionFactory;
+ private CommandService commandService;
private ApplicationContext applicationContext;
+ /**
+ * {@inheritDoc}
+ */
public Object getObject() throws Exception {
SpringConfiguration result = new SpringConfiguration(jbpmConfigurationLocation);
result.setApplicationContext(applicationContext);
result.setSessionFactory(sessionFactory);
+ if (commandService != null) {
+ result.set("commandService", commandService);
+ }
return result;
}
@@ -63,4 +71,10 @@
throws BeansException {
this.applicationContext = applicationContext;
}
+
+ public void setCommandService(CommandService commandService) {
+ this.commandService = commandService;
+ }
+
+
}
Modified: jbpm4/branches/ainze/modules/spring/src/test/java/org/jbpm/spring/test/activities/ExclusiveTest.java
===================================================================
--- jbpm4/branches/ainze/modules/spring/src/test/java/org/jbpm/spring/test/activities/ExclusiveTest.java 2009-03-10 19:24:46 UTC (rev 4221)
+++ jbpm4/branches/ainze/modules/spring/src/test/java/org/jbpm/spring/test/activities/ExclusiveTest.java 2009-03-10 19:25:36 UTC (rev 4222)
@@ -26,7 +26,6 @@
import org.jbpm.Execution;
import org.jbpm.spring.test.AbstractTransactionalSpringJbpmTestCase;
-import org.springframework.core.io.ClassPathResource;
/**
@@ -34,8 +33,6 @@
*/
public class ExclusiveTest extends AbstractTransactionalSpringJbpmTestCase {
-
-
@Override
protected String[] getConfigLocations() {
return new String[]{"org/jbpm/spring/test/applicationContext.xml"};
Modified: jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml
===================================================================
--- jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml 2009-03-10 19:24:46 UTC (rev 4221)
+++ jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/applicationContext.xml 2009-03-10 19:25:36 UTC (rev 4222)
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
@@ -14,91 +12,38 @@
<bean id="configuration" class="org.jbpm.spring.cfg.SpringConfigurationFactoryBean">
<property name="jbpmConfigurationLocation" value="org/jbpm/spring/test/jbpm.cfg.xml" />
<property name="sessionFactory" ref="sessionFactory" />
+ <property name="commandService" ref="commandService" />
</bean>
-
-<!--
- <bean id="configuration" class="org.jbpm.spring.cfg.SpringConfiguration">
- <constructor-arg value="org/jbpm/spring/test/jbpm.cfg.xml" />
- <property name="sessionFactory" ref="sessionFactory" />
- <property name="transactionManager" ref="transactionManager" />
+
+ <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+ <property name="configLocation" value="classpath:org/jbpm/spring/test/hibernate.jbpm.cfg.xml" />
+ <!-- A best practice should be to keep split the config into multiple files
+ <property name="configLocations" value="hibernate.cfg.xml, hibernate.jbpm.cfg.xml" />
+ -->
</bean>
- -->
- <bean id="sessionFactory"
- class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="mappingResources">
- <list>
- <value>jbpm.pvm.typedefs.hbm.xml</value>
- <value>jbpm.pvm.wire.hbm.xml</value>
- <value>jbpm.pvm.definition.hbm.xml</value>
- <value>jbpm.pvm.execution.hbm.xml</value>
- <value>jbpm.pvm.variable.hbm.xml</value>
- <value>jbpm.pvm.history.hbm.xml</value>
- <value>jbpm.pvm.job.hbm.xml</value>
- <value>jbpm.jpdl.hbm.xml</value>
- <value>jbpm.task.hbm.xml</value>
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
- <prop key="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</prop>
- <prop key="hibernate.cache.use_second_level_cache">true</prop>
- <prop key="hibernate.hbm2ddl.auto">create-drop</prop>
- <prop key="hibernate.bytecode.use_reflection_optimizer">false</prop>
- </props>
- </property>
- <property name="entityCacheStrategies">
- <props>
- <prop key="org.jbpm.pvm.internal.model.ProcessDefinitionImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.TransitionImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.EventImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ExceptionHandlerImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ObjectReference">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.VariableDefinitionImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.TimerDefinitionImpl">read-write</prop>
- <prop key="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor">read-write</prop>
- </props>
- </property>
- <property name="collectionCacheStrategies">
- <props>
- <prop key="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.exceptionHandlers">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.events">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.activities">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.variableDefinitions">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.timerDefinitions">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.exceptionHandlers">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.events">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.activities">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.variableDefinitions">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.timerDefinitions">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.incomingTransitions">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ActivityImpl.outgoingTransitions">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.TransitionImpl.exceptionHandlers">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.TransitionImpl.events">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.EventImpl.exceptionHandlers">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.EventImpl.listenerReferences">read-write</prop>
- <prop key="org.jbpm.pvm.internal.model.ExceptionHandlerImpl.eventListenerReferences">read-write</prop>
- <prop key="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.argDescriptors">read-write</prop>
- <prop key="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.operations">read-write</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManager"
- class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+ <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
- <bean id="dataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:mem:." />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
- <bean id="testBean" class="org.jbpm.spring.test.beans.InvokeTestBean" />
+ <!-- We need to get the commandService, since we want a transaction around it. -->
+ <bean id="commandService"
+ class="org.jbpm.pvm.internal.spring.SpringCommandService">
+ <property name="transactionManager" ref="transactionManager" />
+ </bean>
+ <bean id="jobExecutor" class="org.jbpm.pvm.internal.jobexecutor.JobExecutor" init-method="start" destroy-method="stop">
+ <property name="commandExecutor" ref="commandService" />
+ </bean>
+
+ <bean id="testBean" class="org.jbpm.spring.test.beans.InvokeTestBean" />
+
+
</beans>
\ No newline at end of file
Added: jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/hibernate.jbpm.cfg.xml
===================================================================
--- jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/hibernate.jbpm.cfg.xml (rev 0)
+++ jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/hibernate.jbpm.cfg.xml 2009-03-10 19:25:36 UTC (rev 4222)
@@ -0,0 +1,50 @@
+<?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>
+ <mapping resource="jbpm.pvm.typedefs.hbm.xml" />
+ <mapping resource="jbpm.pvm.wire.hbm.xml" />
+ <mapping resource="jbpm.pvm.definition.hbm.xml" />
+ <mapping resource="jbpm.pvm.execution.hbm.xml" />
+ <mapping resource="jbpm.pvm.variable.hbm.xml" />
+ <mapping resource="jbpm.pvm.history.hbm.xml" />
+ <mapping resource="jbpm.pvm.job.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.ProcessDefinitionImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.ActivityImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.TransitionImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.EventImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.ExceptionHandlerImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.ObjectReference" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.VariableDefinitionImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.model.TimerDefinitionImpl" />
+ <class-cache usage="nonstrict-read-write" class="org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor" />
+
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.exceptionHandlers" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.events" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.activities" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.variableDefinitions" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ProcessDefinitionImpl.timerDefinitions" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.exceptionHandlers" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.events" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.activities" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.variableDefinitions" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.timerDefinitions" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.incomingTransitions" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ActivityImpl.outgoingTransitions" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.TransitionImpl.exceptionHandlers" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.TransitionImpl.events" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.EventImpl.exceptionHandlers" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.EventImpl.listenerReferences" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.model.ExceptionHandlerImpl.eventListenerReferences" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.argDescriptors" />
+ <collection-cache usage="nonstrict-read-write" collection="org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.operations" />
+
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
Property changes on: jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/hibernate.jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/jbpm.cfg.xml
===================================================================
--- jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/jbpm.cfg.xml 2009-03-10 19:24:46 UTC (rev 4221)
+++ jbpm4/branches/ainze/modules/spring/src/test/resources/org/jbpm/spring/test/jbpm.cfg.xml 2009-03-10 19:25:36 UTC (rev 4222)
@@ -36,7 +36,7 @@
<script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
</script-manager>
- <job-executor auto-start="false" />
+ <job-executor auto-start="true" />
<job-test-helper />
<id-generator />
17 years, 1 month
JBoss JBPM SVN: r4221 - jbpm4/branches/ainze.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-03-10 15:24:46 -0400 (Tue, 10 Mar 2009)
New Revision: 4221
Modified:
jbpm4/branches/ainze/pom.xml
Log:
added commons-lang
Modified: jbpm4/branches/ainze/pom.xml
===================================================================
--- jbpm4/branches/ainze/pom.xml 2009-03-10 19:24:36 UTC (rev 4220)
+++ jbpm4/branches/ainze/pom.xml 2009-03-10 19:24:46 UTC (rev 4221)
@@ -48,6 +48,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<apache.ant.version>1.7.0</apache.ant.version>
<cactus.version>13-1.7.1</cactus.version>
+ <commons-lang.version>2.4</commons-lang.version>
<gwt.console.version>1.0.0-SNAPSHOT</gwt.console.version>
<hibernate.version>3.2.6.ga</hibernate.version>
<hibernate.annotations.version>3.3.1.GA</hibernate.annotations.version>
@@ -146,6 +147,11 @@
<version>${cactus.version}</version>
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
17 years, 1 month
JBoss JBPM SVN: r4220 - jbpm4/branches/ainze/modules/pvm.
by do-not-reply@jboss.org
Author: ainze
Date: 2009-03-10 15:24:36 -0400 (Tue, 10 Mar 2009)
New Revision: 4220
Modified:
jbpm4/branches/ainze/modules/pvm/pom.xml
Log:
added commons-lang
Modified: jbpm4/branches/ainze/modules/pvm/pom.xml
===================================================================
--- jbpm4/branches/ainze/modules/pvm/pom.xml 2009-03-10 17:53:32 UTC (rev 4219)
+++ jbpm4/branches/ainze/modules/pvm/pom.xml 2009-03-10 19:24:36 UTC (rev 4220)
@@ -1,148 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
-<!-- $Id$ -->
+ <!-- $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <name>jBPM 4 - PVM</name>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-pvm</artifactId>
- <packaging>jar</packaging>
+ <name>jBPM 4 - PVM</name>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-pvm</artifactId>
+ <packaging>jar</packaging>
- <!-- Parent -->
- <parent>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
- <!-- Properties -->
- <properties>
- <table.prefix>JBPM_</table.prefix>
- <!--test.resources.directory>${project.build.directory}/test-resources</test.resources.directory-->
- </properties>
+ <!-- Properties -->
+ <properties>
+ <table.prefix>JBPM_</table.prefix>
+ <!--test.resources.directory>${project.build.directory}/test-resources</test.resources.directory-->
+ </properties>
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-log</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-test-base</artifactId>
- </dependency>
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-log</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-base</artifactId>
+ </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>juel</groupId>
- <artifactId>juel</artifactId>
- </dependency>
- <dependency>
- <groupId>juel</groupId>
- <artifactId>juel-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>juel</groupId>
- <artifactId>juel-engine</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.identity</groupId>
- <artifactId>idm</artifactId>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-j2ee</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.livetribe</groupId>
- <artifactId>livetribe-jsr223</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <!-- Plugins -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>false</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/*TestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>juel</groupId>
+ <artifactId>juel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>juel</groupId>
+ <artifactId>juel-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>juel</groupId>
+ <artifactId>juel-engine</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.identity</groupId>
+ <artifactId>idm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-j2ee</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.livetribe</groupId>
+ <artifactId>livetribe-jsr223</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
- <!-- Profiles -->
- <profiles>
- </profiles>
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/*TestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- <source>1.5</source>
- <verbose>false</verbose>
- <noqualifier>all</noqualifier>
- <excludePackageNames>*.internal:*.test</excludePackageNames>
- </configuration>
- </plugin>
+ <!-- Profiles -->
+ <profiles>
+ </profiles>
- </plugins>
- </reporting>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ <source>1.5</source>
+ <verbose>false</verbose>
+ <noqualifier>all</noqualifier>
+ <excludePackageNames>*.internal:*.test</excludePackageNames>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
</project>
\ No newline at end of file
17 years, 1 month
JBoss JBPM SVN: r4219 - in jbpm4/branches/hbraun/modules/integration: spi/src/main/java/org/jbpm/integration/util and 1 other directory.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-03-10 13:53:32 -0400 (Tue, 10 Mar 2009)
New Revision: 4219
Added:
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java
Modified:
jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
Log:
Set JBPMDeployer.relativeOrder=1000. This way it will kick in after the other deployers
Modified: jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-10 16:09:53 UTC (rev 4218)
+++ jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-10 17:53:32 UTC (rev 4219)
@@ -76,7 +76,7 @@
protected void initializeMainDeployer()
{
setSuffixes(new String[]{ARCHIVE_SUFFIX, JPDL_FILE_SUFFIX});
- setRelativeOrder(-1);
+ setRelativeOrder(1000); // Make sure it kicks in after the other deployers
}
/**
Added: jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java (rev 0)
+++ jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java 2009-03-10 17:53:32 UTC (rev 4219)
@@ -0,0 +1,57 @@
+/*
+ * 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.util;
+
+import java.util.Iterator;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+/**
+ * Locate the single instance of the MBeanServer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 30-Jul-2007
+ */
+public class MBeanServerLocator
+{
+ private MBeanServer mbeanServer;
+
+ public MBeanServer getMbeanServer()
+ {
+ // In jboss-4.2 the MBeanServer cannot be injected
+ if (mbeanServer == null)
+ {
+ for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext();)
+ {
+ mbeanServer = (MBeanServer)i.next();
+ break;
+ }
+ }
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+}
17 years, 1 month