JBoss JBPM SVN: r6887 - in jbpm3/branches/jbpm-3.2-soa: core and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2011-01-27 18:53:38 -0500 (Thu, 27 Jan 2011)
New Revision: 6887
Modified:
jbpm3/branches/jbpm-3.2-soa/core/pom.xml
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml
jbpm3/branches/jbpm-3.2-soa/identity/pom.xml
jbpm3/branches/jbpm-3.2-soa/pom.xml
Log:
JBPM-3033 upgrade to javadoc plugin 2.7;
disable offline links detection
Modified: jbpm3/branches/jbpm-3.2-soa/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/pom.xml 2011-01-26 07:23:02 UTC (rev 6886)
+++ jbpm3/branches/jbpm-3.2-soa/core/pom.xml 2011-01-27 23:53:38 UTC (rev 6887)
@@ -191,6 +191,18 @@
</plugin>
<plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml 2011-01-26 07:23:02 UTC (rev 6886)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml 2011-01-27 23:53:38 UTC (rev 6887)
@@ -95,7 +95,7 @@
</plugin>
<plugin>
- <artifactId>maven-jar-plugin</artifactId>
+ <artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
@@ -104,6 +104,18 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -213,17 +225,17 @@
Desc: HSQL test exclusions
-->
<profile>
- <id>hsqldb</id>
- <activation>
- <property>
- <name>database</name>
- <value>hsqldb</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <id>hsqldb</id>
+ <activation>
+ <property>
+ <name>database</name>
+ <value>hsqldb</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<!--
@@ -235,9 +247,9 @@
<exclude>org/jbpm/enterprise/jbpm1952/JBPM1952Test.java</exclude>
</excludes>
</configuration>
- </plugin>
- </plugins>
- </build>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<!--
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2011-01-26 07:23:02 UTC (rev 6886)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2011-01-27 23:53:38 UTC (rev 6887)
@@ -45,6 +45,18 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Modified: jbpm3/branches/jbpm-3.2-soa/identity/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/identity/pom.xml 2011-01-26 07:23:02 UTC (rev 6886)
+++ jbpm3/branches/jbpm-3.2-soa/identity/pom.xml 2011-01-27 23:53:38 UTC (rev 6887)
@@ -78,6 +78,21 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <docfilessubdirs>true</docfilessubdirs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2011-01-26 07:23:02 UTC (rev 6886)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2011-01-27 23:53:38 UTC (rev 6887)
@@ -57,6 +57,9 @@
<mysql.connector.version>5.0.7</mysql.connector.version>
<ojdbc.version>10.2.0.4</ojdbc.version>
<postgresql.version>8.2-504.jdbc3</postgresql.version>
+
+ <!-- Plugin versions -->
+ <version.javadoc.plugin>2.7</version.javadoc.plugin>
</properties>
<!-- DependencyManagement -->
@@ -417,7 +420,7 @@
<configuration>
<source>${maven.compiler.source}</source>
<quiet>true</quiet>
- <docfilessubdirs>true</docfilessubdirs>
+ <detectOfflineLinks>false</detectOfflineLinks>
</configuration>
</plugin>
@@ -512,18 +515,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
@@ -547,18 +538,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
@@ -835,18 +814,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
13 years, 3 months
JBoss JBPM SVN: r6886 - in jbpm3/branches/jbpm-3.2-soa: enterprise-jee5 and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2011-01-26 02:23:02 -0500 (Wed, 26 Jan 2011)
New Revision: 6886
Modified:
jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-clustered-jbm-service.xml
jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-jbm-service.xml
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/ejb-jar.xml
Log:
remove references to soa and esb from enterprise module, second take
Modified: jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-clustered-jbm-service.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-clustered-jbm-service.xml 2011-01-22 09:16:50 UTC (rev 6885)
+++ jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-clustered-jbm-service.xml 2011-01-26 07:23:02 UTC (rev 6886)
@@ -1,33 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.jbpm.destination:service=Queue,name=JbpmDLQ"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="Clustered">true</attribute>
+ </mbean>
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.destination:service=Queue,name=JbpmDLQ"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="Clustered">true</attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.destination:service=Queue,name=JbpmCommandQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="Clustered">true</attribute>
- <attribute name="RedeliveryDelay">60000</attribute>
- <attribute name="DLQ">jboss.esb.destination:service=Queue,name=JbpmDLQ</attribute>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.destination:service=Queue,name=JbpmJobQueue"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- <attribute name="Clustered">true</attribute>
- <attribute name="RedeliveryDelay">60000</attribute>
- <attribute name="DLQ">jboss.esb.destination:service=Queue,name=JbpmDLQ</attribute>
- </mbean>
-
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.jbpm.destination:service=Queue,name=JbpmCommandQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="Clustered">true</attribute>
+ <attribute name="RedeliveryDelay">60000</attribute>
+ <attribute name="DLQ">jboss.jbpm.destination:service=Queue,name=JbpmDLQ</attribute>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.jbpm.destination:service=Queue,name=JbpmJobQueue"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ <attribute name="Clustered">true</attribute>
+ <attribute name="RedeliveryDelay">60000</attribute>
+ <attribute name="DLQ">jboss.jbpm.destination:service=Queue,name=JbpmDLQ</attribute>
+ </mbean>
</server>
\ No newline at end of file
Modified: jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-jbm-service.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-jbm-service.xml 2011-01-22 09:16:50 UTC (rev 6885)
+++ jbpm3/branches/jbpm-3.2-soa/distribution/src/main/resources/destination/jbpm-jbm-service.xml 2011-01-26 07:23:02 UTC (rev 6886)
@@ -12,29 +12,29 @@
<server>
<mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.destination:service=Queue,name=JbpmDLQ"
+ name="jboss.jbpm.destination:service=Queue,name=JbpmDLQ"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
</mbean>
<mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.destination:service=Queue,name=JbpmJobQueue"
+ name="jboss.jbpm.destination:service=Queue,name=JbpmJobQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<!-- JBPM-1952 a small redelivery delay goes a long way towards mitigating
stale state exceptions and deadlocks under heavy concurrency conditions -->
<attribute name="RedeliveryDelay">5000</attribute>
- <attribute name="DLQ">jboss.esb.destination:service=Queue,name=JbpmDLQ</attribute>
+ <attribute name="DLQ">jboss.jbpm.destination:service=Queue,name=JbpmDLQ</attribute>
</mbean>
<mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.destination:service=Queue,name=JbpmCommandQueue"
+ name="jboss.jbpm.destination:service=Queue,name=JbpmCommandQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="RedeliveryDelay">5000</attribute>
- <attribute name="DLQ">jboss.esb.destination:service=Queue,name=JbpmDLQ</attribute>
+ <attribute name="DLQ">jboss.jbpm.destination:service=Queue,name=JbpmDLQ</attribute>
</mbean>
</server>
\ No newline at end of file
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2011-01-22 09:16:50 UTC (rev 6885)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2011-01-26 07:23:02 UTC (rev 6886)
@@ -45,14 +45,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
</plugins>
</build>
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/ejb-jar.xml 2011-01-22 09:16:50 UTC (rev 6885)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/ejb-jar.xml 2011-01-26 07:23:02 UTC (rev 6886)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
@@ -8,7 +7,7 @@
<description>Executes commands in a separate context.</description>
<display-name>jBPM Command Service</display-name>
<ejb-name>CommandServiceBean</ejb-name>
-
+
<resource-ref>
<description>
Data source that provides the persistence service with connections.
@@ -52,14 +51,14 @@
<activation-config-property-value>150</activation-config-property-value>
</activation-config-property>
<activation-config-property>
- <activation-config-property-name>dLQJNDIName</activation-config-property-name>
- <activation-config-property-value>queue/JbpmDLQ</activation-config-property-value>
- </activation-config-property>
- <activation-config-property>
- <activation-config-property-name>destination</activation-config-property-name>
- <activation-config-property-value>queue/JbpmCommandQueue</activation-config-property-value>
- </activation-config-property>
+ <activation-config-property-name>dLQJNDIName</activation-config-property-name>
+ <activation-config-property-value>queue/JbpmDLQ</activation-config-property-value>
+ </activation-config-property>
<activation-config-property>
+ <activation-config-property-name>destination</activation-config-property-name>
+ <activation-config-property-value>queue/JbpmCommandQueue</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
@@ -88,14 +87,14 @@
<activation-config-property-value>150</activation-config-property-value>
</activation-config-property>
<activation-config-property>
- <activation-config-property-name>dLQJNDIName</activation-config-property-name>
- <activation-config-property-value>queue/JbpmDLQ</activation-config-property-value>
- </activation-config-property>
+ <activation-config-property-name>dLQJNDIName</activation-config-property-name>
+ <activation-config-property-value>queue/JbpmDLQ</activation-config-property-value>
+ </activation-config-property>
<activation-config-property>
- <activation-config-property-name>destination</activation-config-property-name>
- <activation-config-property-value>queue/JbpmJobQueue</activation-config-property-value>
- </activation-config-property>
- <activation-config-property>
+ <activation-config-property-name>destination</activation-config-property-name>
+ <activation-config-property-value>queue/JbpmJobQueue</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
13 years, 3 months
JBoss JBPM SVN: r6885 - in jbpm3/branches/jbpm-3.2-soa/core/src: main/java/org/jbpm/instantiation and 2 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2011-01-22 04:16:50 -0500 (Sat, 22 Jan 2011)
New Revision: 6885
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/JbpmConfigurationTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/BeanFactoryTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/ObjectFactoryTest.java
Log:
JBPM-3023 refine synchronized blocks in ObjectFactoryImpl to decrease likelihood of deadlock involving ProcessClassLoader
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -27,10 +27,10 @@
public abstract class AbstractObjectInfo implements ObjectInfo {
private static final long serialVersionUID = 1L;
-
- String name;
- boolean isSingleton;
+ private String name;
+ private boolean singleton;
+
public AbstractObjectInfo() {
}
@@ -38,34 +38,33 @@
if (element.hasAttribute("name")) {
name = element.getAttribute("name");
}
- if ("true".equalsIgnoreCase(element.getAttribute("singleton"))) {
- isSingleton = true;
+ if (element.hasAttribute("singleton")) {
+ singleton = Boolean.valueOf(element.getAttribute("singleton")).booleanValue();
}
}
-
+
protected String getValueString(Element element) {
- String value = null;
- if (element.hasAttribute("value")) {
- value = element.getAttribute("value");
- } else {
- value = XmlUtil.getContentText(element);
- }
- return value;
+ return element.hasAttribute("value") ? element.getAttribute("value")
+ : XmlUtil.getContentText(element);
}
public boolean hasName() {
- return (name!=null);
+ return name != null;
}
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
+
public boolean isSingleton() {
- return isSingleton;
+ return singleton;
}
- public void setSingleton(boolean isSingleton) {
- this.isSingleton = isSingleton;
+
+ public void setSingleton(boolean singleton) {
+ this.singleton = singleton;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -100,7 +100,7 @@
public Object createObject(ObjectFactoryImpl objectFactory) {
JbpmTypeMatcher jbpmTypeMatcher = typeMatcherObjectInfo == null ? NoTypeMatcher.INSTANCE
- : (JbpmTypeMatcher) objectFactory.createObject(typeMatcherObjectInfo);
+ : (JbpmTypeMatcher) objectFactory.getObject(typeMatcherObjectInfo);
return new JbpmType(jbpmTypeMatcher, converter, variableInstanceClass);
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -21,7 +21,6 @@
*/
package org.jbpm.configuration;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -31,99 +30,98 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmException;
import org.jbpm.util.ClassLoaderUtil;
public class ObjectFactoryImpl implements ObjectFactory {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 2L;
- private final List objectInfos;
private final Map namedObjectInfos;
private final Map singletons = new HashMap();
- private final Map objects = new HashMap();
- private final Collection objectsUnderConstruction = new HashSet();
- private ClassLoader classLoader;
+ private transient final Map objects = new HashMap();
+ private transient final Collection objectsUnderConstruction = new HashSet();
+ private transient ClassLoader classLoader;
public ObjectFactoryImpl() {
- objectInfos = new ArrayList();
namedObjectInfos = new HashMap();
}
+ ObjectFactoryImpl(Map namedObjectInfos) {
+ this.namedObjectInfos = namedObjectInfos;
+ }
+
+ /** @deprecated creating objects by index is no longer supported */
public ObjectFactoryImpl(Map namedObjectInfos, List objectInfos) {
this.namedObjectInfos = namedObjectInfos;
- this.objectInfos = objectInfos;
}
public void addObjectInfo(ObjectInfo objectInfo) {
- if (objectInfo.hasName()) {
- if (log.isDebugEnabled()) log.debug("adding object info: " + objectInfo.getName());
- Object removed = namedObjectInfos.put(objectInfo.getName(), objectInfo);
- if (removed != null) objectInfos.remove(removed);
+ if (!objectInfo.hasName()) {
+ throw new ConfigurationException(objectInfo + " has no name");
}
- objectInfos.add(objectInfo);
+
+ String name = objectInfo.getName();
+ if (log.isDebugEnabled()) log.debug("adding object info: " + name);
+ synchronized (namedObjectInfos) {
+ namedObjectInfos.put(name, objectInfo);
+ }
}
+ private ObjectInfo getObjectInfo(String name) {
+ synchronized (namedObjectInfos) {
+ ObjectInfo objectInfo = (ObjectInfo) namedObjectInfos.get(name);
+ if (objectInfo == null) {
+ throw new ConfigurationException("no info for object '" + name + "'; defined objects: "
+ + namedObjectInfos.keySet());
+ }
+ return objectInfo;
+ }
+ }
+
/**
- * create a new object of the given name. Before creation starts, the non-singleton objects
- * will be cleared from the registry. The singletons will remain in the registry.
+ * create a new object of the given name. Before creation starts, non-singleton objects will
+ * be cleared from the registry. Singletons will remain.
*/
- public synchronized Object createObject(String name) {
- ObjectInfo objectInfo = (ObjectInfo) namedObjectInfos.get(name);
- if (objectInfo == null) {
- throw new ConfigurationException("name '" + name
- + "' is not defined in the configuration. configured names: "
- + namedObjectInfos.keySet());
- }
+ public Object createObject(String name) {
+ ObjectInfo objectInfo = getObjectInfo(name);
return createObject(objectInfo);
}
- public synchronized boolean hasObject(String name) {
- return namedObjectInfos.containsKey(name);
+ public boolean hasObject(String name) {
+ synchronized (namedObjectInfos) {
+ return namedObjectInfos.containsKey(name);
+ }
}
/**
- * create a new object for the given index. Before creation starts, the non-singlton objects
- * will be cleared from the registry. The singletons will remain in the registry.
+ * create a new object for the given index. Before creation starts, non-singleton objects will
+ * be cleared from the registry. Singletons will remain.
+ *
+ * @deprecated creating objects by index is no longer supported
*/
public Object createObject(int index) {
- if (index < 0 || index >= objectInfos.size()) {
- throw new ConfigurationException("index '" + index
- + "' is not defined in the configuration. range [0.." + (objectInfos.size() - 1) + "]");
- }
- return createObject((ObjectInfo) objectInfos.get(index));
+ throw new UnsupportedOperationException();
}
/**
- * create a new object for the given {@link ObjectInfo}. Before creation starts, the
- * non-singleton objects will be cleared from the registry. The singletons will remain in the
- * registry.
+ * create a new object for the given {@link ObjectInfo}. Before creation starts, non-singleton
+ * objects will be cleared from the registry. Singletons will remain.
*/
public Object createObject(ObjectInfo objectInfo) {
- clearRegistry();
- return getObject(objectInfo);
+ synchronized (objects) {
+ objects.clear();
+ objectsUnderConstruction.clear();
+ return getObject(objectInfo);
+ }
}
- private void clearRegistry() {
- objects.clear();
- objectsUnderConstruction.clear();
- }
-
/**
* create an object of the given name. If the object was created before, that object is
* returned from the registry.
*/
Object getObject(String name) {
- Object object = null;
- ObjectInfo objectInfo = (ObjectInfo) namedObjectInfos.get(name);
- if (objectInfo != null) {
- object = getObject(objectInfo);
- }
- else {
- log.warn("no info for object '" + name + "'. defined objects: "
- + namedObjectInfos.keySet().toString());
- }
- return object;
+ ObjectInfo objectInfo = getObjectInfo(name);
+ return getObject(objectInfo);
}
/**
@@ -131,69 +129,36 @@
* object is returned from the registry.
*/
Object getObject(ObjectInfo objectInfo) {
- Object object = null;
+ // use object name as registry key
+ String registryKey = objectInfo.hasName() ? objectInfo.getName() : null;
+ // if name is not specified, just create object without registering it
+ if (registryKey == null) return objectInfo.createObject(this);
- Object registryKey = getRegistryKey(objectInfo);
- if (isInRegistry(registryKey)) {
- object = findInRegistry(registryKey);
- }
- else {
- if (registryKey != null) {
- if (objectsUnderConstruction.contains(registryKey)) {
- throw new JbpmException("circular object dependency on bean '" + registryKey + "'");
- }
- objectsUnderConstruction.add(registryKey);
- try {
- object = objectInfo.createObject(this);
- }
- finally {
- objectsUnderConstruction.remove(registryKey);
- }
- putInRegistry(objectInfo, object, registryKey);
- }
- else {
- object = objectInfo.createObject(this);
- }
- }
- return object;
- }
+ // select appropriate registry based on singleton property
+ Map registry = objectInfo.isSingleton() ? singletons : objects;
+ // if object is already registered, use existing object
+ if (registry.containsKey(registryKey)) return registry.get(registryKey);
- Class classForName(String className) throws ClassNotFoundException {
- if (classLoader == null) {
- classLoader = ClassLoaderUtil.getClassLoader();
+ // prevent circular references
+ if (objectsUnderConstruction.contains(registryKey)) {
+ throw new ConfigurationException("circular reference to object '" + registryKey + "'");
}
- return Class.forName(className, false, classLoader);
- }
- private Object getRegistryKey(ObjectInfo objectInfo) {
- Object key = null;
- if (objectInfo.hasName()) {
- key = objectInfo.getName();
+ objectsUnderConstruction.add(registryKey);
+ try {
+ // create and register object
+ Object object = objectInfo.createObject(this);
+ registry.put(registryKey, object);
+ return object;
}
- return key;
- }
-
- private boolean isInRegistry(Object registryKey) {
- return registryKey != null
- && (objects.containsKey(registryKey) || singletons.containsKey(registryKey));
- }
-
- private void putInRegistry(ObjectInfo objectInfo, Object object, Object registryKey) {
- if (objectInfo.isSingleton()) {
- singletons.put(registryKey, object);
+ finally {
+ objectsUnderConstruction.remove(registryKey);
}
- else {
- objects.put(registryKey, object);
- }
}
- private Object findInRegistry(Object registryKey) {
- Object object = null;
- if (registryKey != null) {
- object = objects.get(registryKey);
- if (object == null) object = singletons.get(registryKey);
- }
- return object;
+ Class classForName(String className) throws ClassNotFoundException {
+ if (classLoader == null) classLoader = ClassLoaderUtil.getClassLoader();
+ return Class.forName(className, false, classLoader);
}
private static final Log log = LogFactory.getLog(ObjectFactoryImpl.class);
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -38,9 +38,8 @@
private static final long serialVersionUID = 1L;
- private static final Class[] constructorParameterTypes = {
- Element.class, ObjectFactoryParser.class
- };
+ private static final Class[] constructorParameterTypes = { Element.class,
+ ObjectFactoryParser.class };
private static final Map defaultMappings = getDefaultMappings();
@@ -97,9 +96,12 @@
}
public static ObjectFactoryImpl createObjectFactory(Element infosElement) {
- ObjectFactoryImpl objectFactory = new ObjectFactoryImpl();
- new ObjectFactoryParser().parseElements(infosElement, objectFactory);
- return objectFactory;
+ ObjectFactoryParser parser = new ObjectFactoryParser();
+ for (Iterator iter = XmlUtil.elementIterator(infosElement); iter.hasNext();) {
+ Element infoElement = (Element) iter.next();
+ parser.parse(infoElement);
+ }
+ return new ObjectFactoryImpl(parser.namedObjectInfos);
}
public void parseElementsFromResource(String resource, ObjectFactoryImpl objectFactory) {
@@ -123,6 +125,7 @@
}
private Map mappings;
+ private final Map namedObjectInfos = new HashMap();
public ObjectFactoryParser() {
this(getDefaultMappings());
@@ -139,9 +142,9 @@
throw new JbpmException("no ObjectInfo class specified for element: " + tagName);
}
try {
- return (ObjectInfo) constructor.newInstance(new Object[] {
- element, this
- });
+ ObjectInfo objectInfo = (ObjectInfo) constructor.newInstance(new Object[] { element, this });
+ if (objectInfo.hasName()) addNamedObjectInfo(objectInfo.getName(), objectInfo);
+ return objectInfo;
}
catch (InstantiationException e) {
throw new JbpmException("failed to instantiate " + constructor.getDeclaringClass(), e);
@@ -154,14 +157,12 @@
}
}
- /** @deprecated */
public void addNamedObjectInfo(String name, ObjectInfo objectInfo) {
+ namedObjectInfos.put(name, objectInfo);
}
public void addMapping(String elementName, Class objectInfoClass) {
- if (mappings == defaultMappings) {
- mappings = new HashMap(defaultMappings);
- }
+ if (mappings == defaultMappings) mappings = new HashMap(defaultMappings);
addMapping(mappings, elementName, objectInfoClass);
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -33,9 +33,9 @@
import org.jbpm.util.ClassLoaderUtil;
/**
- * Factory that caches the class loaders it produces, in order to prevent duplicate class
- * loaders from eating up the permanent generation space. The cache does not prevent class
- * loaders from being discarded by the garbage collector.
+ * Factory that keeps soft references to the class loaders it produces, in order to prevent
+ * duplicate class loaders from eating up the permanent generation space. The cache does not
+ * prevent the garbage collector from discarding the class loaders.
*
* @author Alejandro Guizar
*/
@@ -61,8 +61,7 @@
// if class loader is not cached,
if (processClassLoader == null) {
// (re-)create class loader
- processClassLoader = new ProcessClassLoader(parentClassLoader, processDefinition,
- jbpmConfiguration);
+ processClassLoader = new ProcessClassLoader(parentClassLoader, processDefinition, jbpmConfiguration);
// add class loader to cache
putProcessClassLoader(key, processClassLoader);
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/JbpmConfigurationTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/JbpmConfigurationTest.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/JbpmConfigurationTest.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -42,7 +42,7 @@
}
public void testSingleton() {
- JbpmConfiguration.setDefaultObjectFactory(new ObjectFactoryImpl(null, null));
+ JbpmConfiguration.setDefaultObjectFactory(new ObjectFactoryImpl());
JbpmConfiguration instance = JbpmConfiguration.getInstance();
assertSame(instance, JbpmConfiguration.getInstance());
assertSame(instance, JbpmConfiguration.getInstance());
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/BeanFactoryTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/BeanFactoryTest.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/BeanFactoryTest.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -22,6 +22,7 @@
package org.jbpm.configuration;
import java.util.List;
+import java.util.Map;
import org.jbpm.AbstractJbpmTestCase;
@@ -59,16 +60,16 @@
public void testBeanDefaultConstructor() {
parse("<beans>"
- + " <bean class='" + MyBean.class.getName() + "' />"
+ + " <bean name='mybean' class='" + MyBean.class.getName() + "' />"
+ "</beans>");
- MyBean myBean = (MyBean) objectFactory.createObject(0);
+ MyBean myBean = (MyBean) objectFactory.createObject("mybean");
assertNull(myBean.text);
}
public void testBeanConstructor() {
parse("<beans>"
- + " <bean class='" + MyBean.class.getName() + "'>"
+ + " <bean name='mybean' class='" + MyBean.class.getName() + "'>"
+ " <constructor>"
+ " <parameter class='java.lang.String'>"
+ " <string>hello</string>"
@@ -80,7 +81,7 @@
+ " </bean>"
+ "</beans>");
- MyBean myBean = (MyBean) objectFactory.createObject(0);
+ MyBean myBean = (MyBean) objectFactory.createObject("mybean");
assertEquals("hello", myBean.text);
assertEquals(new Integer(6), myBean.number);
assertFalse(myBean.isSetterUsed);
@@ -142,13 +143,13 @@
public void testFieldInjection() {
parse("<beans>"
- + " <bean class='" + MyBean.class.getName() + "'>"
+ + " <bean name='mybean' class='" + MyBean.class.getName() + "'>"
+ " <field name='text'><string>hello</string></field>"
+ " <field name='number'><integer>6</integer></field>"
+ " </bean>"
+ "</beans>");
- MyBean myBean = (MyBean) objectFactory.createObject(0);
+ MyBean myBean = (MyBean) objectFactory.createObject("mybean");
assertEquals("hello", myBean.text);
assertEquals(new Integer(6), myBean.number);
assertFalse(myBean.isSetterUsed);
@@ -156,13 +157,13 @@
public void testPropertyInjection() {
parse("<beans>"
- + " <bean class='" + MyBean.class.getName() + "'>"
+ + " <bean name='mybean' class='" + MyBean.class.getName() + "'>"
+ " <property name='text'><string>hello</string></property>"
+ " <property name='number'><integer>6</integer></property>"
+ " </bean>"
+ "</beans>");
- MyBean myBean = (MyBean) objectFactory.createObject(0);
+ MyBean myBean = (MyBean) objectFactory.createObject("mybean");
assertEquals("hello", myBean.text);
assertEquals(new Integer(6), myBean.number);
assertTrue(myBean.isSetterUsed);
@@ -212,24 +213,24 @@
objectFactory.createObject("first");
fail("expected exception");
}
- catch (RuntimeException e) {
- assertTrue(e.getMessage().startsWith("circular object dependency"));
+ catch (ConfigurationException e) {
+ assertTrue(e.getMessage().indexOf("first") != -1);
}
try {
objectFactory.createObject("second");
fail("expected exception");
}
- catch (RuntimeException e) {
- assertTrue(e.getMessage().startsWith("circular object dependency"));
+ catch (ConfigurationException e) {
+ assertTrue(e.getMessage().indexOf("second") != -1);
}
try {
objectFactory.createObject("third");
fail("expected exception");
}
- catch (RuntimeException e) {
- assertTrue(e.getMessage().startsWith("circular object dependency"));
+ catch (ConfigurationException e) {
+ assertTrue(e.getMessage().indexOf("third") != -1);
}
}
@@ -238,17 +239,36 @@
public void testListWithBeanRef() {
parse("<beans>"
- + " <list>"
+ + " <list name='mylist'>"
+ " <bean name='a' class='" + A.class.getName() + "' />"
+ " <ref bean='a' />"
+ " </list>"
+ "</beans>");
- List list = (List) objectFactory.createObject(0);
- assertNotNull(list);
+ List list = (List) objectFactory.createObject("mylist");
assertEquals(2, list.size());
+ assertSame(list.get(0), list.get(1));
}
+ public void testMapWithBeanRef() {
+ parse("<beans>"
+ + " <map name='mymap'>"
+ + " <entry>"
+ + " <key><string value='1st'/></key>"
+ + " <value><bean name='a' class='" + A.class.getName() + "'/></value>"
+ + " </entry>"
+ + " <entry>"
+ + " <key><string value='2nd'/></key>"
+ + " <value><ref bean='a'/></value>"
+ + " </entry>"
+ + " </map>"
+ + "</beans>");
+
+ Map map = (Map) objectFactory.createObject("mymap");
+ assertEquals(2, map.size());
+ assertSame(map.get("1st"), map.get("2nd"));
+ }
+
public static class Shape {
String color;
int lineSize = -1;
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/ObjectFactoryTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/ObjectFactoryTest.java 2011-01-17 05:22:26 UTC (rev 6884)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/configuration/ObjectFactoryTest.java 2011-01-22 09:16:50 UTC (rev 6885)
@@ -35,17 +35,6 @@
objectFactory = ObjectFactoryParser.parseXmlString(xml);
}
- public void testBean() {
- parse(
- "<beans>" +
- " <bean class='java.util.HashMap' />" +
- "</beans>"
- );
-
- HashMap m = (HashMap) objectFactory.createObject(0);
- assertNotNull(m);
- }
-
public void testNamedBean() {
parse(
"<beans>" +
@@ -93,23 +82,6 @@
assertSame(m1, m2);
}
- public void testMap() {
- parse(
- "<beans>" +
- " <map>" +
- " <entry><key><string>a</string></key><value><int>1</int></value></entry>" +
- " <entry><key><string>b</string></key><value><int>2</int></value></entry>" +
- " <entry><key><string>c</string></key><value><int>3</int></value></entry>" +
- " </map>" +
- "</beans>"
- );
-
- Map m = (Map) objectFactory.createObject(0);
- assertEquals(new Integer(1), m.get("a"));
- assertEquals(new Integer(2), m.get("b"));
- assertEquals(new Integer(3), m.get("c"));
- }
-
public void testNamedMap() {
parse(
"<beans>" +
@@ -157,23 +129,6 @@
assertSame(m1, m2);
}
- public void testList() {
- parse(
- "<beans>" +
- " <list>" +
- " <string>a</string>" +
- " <string>b</string>" +
- " <string>c</string>" +
- " </list>" +
- "</beans>"
- );
-
- List l = (List) objectFactory.createObject(0);
- assertEquals("a", l.get(0));
- assertEquals("b", l.get(1));
- assertEquals("c", l.get(2));
- }
-
public void testNamedList() {
parse(
"<beans>" +
@@ -221,16 +176,6 @@
assertSame(l1, l2);
}
- public void testNull() {
- parse(
- "<beans>" +
- " <null />" +
- "</beans>"
- );
-
- assertNull(objectFactory.createObject(0));
- }
-
public void testNamedNull() {
parse(
"<beans>" +
@@ -241,16 +186,6 @@
assertNull(objectFactory.createObject("mynull"));
}
- public void testString() {
- parse(
- "<beans>" +
- " <string>mytext</string>" +
- "</beans>"
- );
-
- assertEquals("mytext", objectFactory.createObject(0));
- }
-
public void testNamedString() {
parse(
"<beans>" +
@@ -261,16 +196,6 @@
assertEquals("four", objectFactory.createObject("level"));
}
- public void testInt() {
- parse(
- "<beans>" +
- " <int>5</int>" +
- "</beans>"
- );
-
- assertEquals(new Integer(5), objectFactory.createObject(0));
- }
-
public void testNamedInt() {
parse(
"<beans>" +
@@ -281,16 +206,6 @@
assertEquals(new Integer(5), objectFactory.createObject("level"));
}
- public void testInteger() {
- parse(
- "<beans>" +
- " <integer>6</integer>" +
- "</beans>"
- );
-
- assertEquals(new Integer(6), objectFactory.createObject(0));
- }
-
public void testNamedInteger() {
parse(
"<beans>" +
@@ -301,16 +216,6 @@
assertEquals(new Integer(6), objectFactory.createObject("level"));
}
- public void testLong() {
- parse(
- "<beans>" +
- " <long>7</long>" +
- "</beans>"
- );
-
- assertEquals(new Long(7), objectFactory.createObject(0));
- }
-
public void testNamedLong() {
parse(
"<beans>" +
@@ -321,16 +226,6 @@
assertEquals(new Long(7), objectFactory.createObject("level"));
}
- public void testFloat() {
- parse(
- "<beans>" +
- " <float>7.7</float>" +
- "</beans>"
- );
-
- assertEquals(new Float(7.7), objectFactory.createObject(0));
- }
-
public void testNamedFloat() {
parse(
"<beans>" +
@@ -341,16 +236,6 @@
assertEquals(new Float(7.7), objectFactory.createObject("level"));
}
- public void testDouble() {
- parse(
- "<beans>" +
- " <double>8.8</double>" +
- "</beans>"
- );
-
- assertEquals(new Double(8.8), objectFactory.createObject(0));
- }
-
public void testNamedDouble() {
parse(
"<beans>" +
@@ -361,16 +246,6 @@
assertEquals(new Double(8.8), objectFactory.createObject("level"));
}
- public void testChar() {
- parse(
- "<beans>" +
- " <char>a</char>" +
- "</beans>"
- );
-
- assertEquals(new Character('a'), objectFactory.createObject(0));
- }
-
public void testNamedChar() {
parse(
"<beans>" +
@@ -381,18 +256,6 @@
assertEquals(new Character('a'), objectFactory.createObject("level"));
}
- public void testBoolean() {
- parse(
- "<beans>" +
- " <boolean>true</boolean>" +
- " <boolean>false</boolean>" +
- "</beans>"
- );
-
- assertEquals(Boolean.TRUE, objectFactory.createObject(0));
- assertEquals(Boolean.FALSE, objectFactory.createObject(1));
- }
-
public void testNamedBoolean() {
parse(
"<beans>" +
@@ -420,20 +283,4 @@
// OK
}
}
-
- public void testUndefinedIndex() {
- parse(
- "<beans>" +
- " <string>1</string>" +
- " <string>2</string>" +
- "</beans>"
- );
-
- try {
- objectFactory.createObject(5);
- fail("expected exception");
- } catch (ConfigurationException e) {
- // OK
- }
- }
}
13 years, 3 months
JBoss JBPM SVN: r6884 - jbpm3/branches/jbpm-3.2-soa/ci.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2011-01-17 00:22:26 -0500 (Mon, 17 Jan 2011)
New Revision: 6884
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh
Log:
replace test goal with install in standalone script to prevent 'artifact not found' failures
Modified: jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh 2011-01-16 21:57:52 UTC (rev 6883)
+++ jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh 2011-01-17 05:22:26 UTC (rev 6884)
@@ -15,5 +15,5 @@
mvn -s $MAVEN_SETTINGS -v
# Run standalone test suite
-mvn -s $MAVEN_SETTINGS -U -Dsurefire.jvm.args=-Xmx256m \
- -Dmaven.test.failure.ignore=true clean test
+mvn -s $MAVEN_SETTINGS -U '-Dsurefire.jvm.args=-Xms16m -Xmx256m' \
+ -Dmaven.test.failure.ignore=true clean install
13 years, 3 months
JBoss JBPM SVN: r6883 - jbpm3/branches/jbpm-3.2-soa/ci.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2011-01-16 16:57:52 -0500 (Sun, 16 Jan 2011)
New Revision: 6883
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/container.sh
Log:
adapt container script to maven 2.2.1, which is incompatible with jdk 1.4
Modified: jbpm3/branches/jbpm-3.2-soa/ci/container.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2011-01-14 20:39:39 UTC (rev 6882)
+++ jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2011-01-16 21:57:52 UTC (rev 6883)
@@ -49,19 +49,22 @@
JAVA=$JAVA_HOME/bin/java
JAVA_VERSION=`$JAVA -version 2>&1 | grep version | awk '{ print substr($3, 2, 3); }'`
-ORIG_JAVA=$JAVA
-ORIG_JAVA_HOME=$JAVA_HOME
+# Set up Maven
+export MAVEN_OPTS="-Ddatabase=$DATABASE -Xms16m -Xmx256m"
+[ -z $MAVEN_SETTINGS ] && MAVEN_SETTINGS=ci/settings-qa.xml
if [ $JAVA_VERSION = 1.4 ]; then
- # Switch to JDK 1.5 for building and installing jBPM
+ # Tell Maven to use JDK 1.4 for running tests
+ export MAVEN_OPTS="$MAVEN_OPTS -Djvm=$JAVA"
+
+ # Switch to JDK 1.5 for Maven builds and jBPM installation
+ JAVA_14=$JAVA
+ JAVA_14_HOME=$JAVA_HOME
+
JAVA=$JAVA_15_HOME/bin/java
export JAVA_HOME=$JAVA_15_HOME
fi
-# Set up Maven
-export MAVEN_OPTS="-Ddatabase=$DATABASE -Xms16m -Xmx256m"
-[ -z $MAVEN_SETTINGS ] && MAVEN_SETTINGS=ci/settings-qa.xml
-
# Display Maven version
mvn -s $MAVEN_SETTINGS -v
@@ -140,9 +143,10 @@
fi
fi
-# Switch back to JDK 1.4 for running test suite
-export JAVA_HOME=$ORIG_JAVA_HOME
-JAVA=$ORIG_JAVA
+if [ $JAVA_VERSION = 1.4 ]; then
+ # Switch back to JDK 1.4 for JBoss AS launch
+ JAVA=$JAVA_14
+fi
# BEGIN section taken from run.sh
13 years, 3 months
JBoss JBPM SVN: r6882 - in jbpm3/branches/jbpm-3.2-soa/enterprise-jee5: src/main/resources and 1 other directories.
by do-not-reply@jboss.org
Author: bradsdavis
Date: 2011-01-14 15:39:39 -0500 (Fri, 14 Jan 2011)
New Revision: 6882
Added:
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap4x-aop.xml
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap5x-aop.xml
Removed:
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa4x-aop.xml
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa5x-aop.xml
Modified:
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/.classpath
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/jboss.xml
Log:
Removed reference to SOA and ESB.
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/.classpath
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/.classpath 2011-01-13 10:08:50 UTC (rev 6881)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/.classpath 2011-01-14 20:39:39 UTC (rev 6882)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2011-01-13 10:08:50 UTC (rev 6881)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/pom.xml 2011-01-14 20:39:39 UTC (rev 6882)
@@ -45,6 +45,14 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
@@ -76,17 +84,17 @@
<profiles>
<profile>
- <id>soa4x</id>
+ <id>eap4x</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
- <finalName>${project.artifactId}-${project.version}-soa4x</finalName>
+ <finalName>${project.artifactId}-${project.version}-eap4x</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
- <exclude>*soa5x*</exclude>
+ <exclude>*eap5x*</exclude>
</excludes>
</resource>
</resources>
@@ -94,14 +102,14 @@
</profile>
<profile>
- <id>soa5x</id>
+ <id>eap5x</id>
<build>
- <finalName>${project.artifactId}-${project.version}-soa5x</finalName>
+ <finalName>${project.artifactId}-${project.version}-eap5x</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
- <exclude>*soa4x*</exclude>
+ <exclude>*eap4x*</exclude>
</excludes>
</resource>
</resources>
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/jboss.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/jboss.xml 2011-01-13 10:08:50 UTC (rev 6881)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/META-INF/jboss.xml 2011-01-14 20:39:39 UTC (rev 6882)
@@ -6,15 +6,15 @@
<enterprise-beans>
<message-driven>
<ejb-name>CommandListenerBean</ejb-name>
- <depends>jboss.esb.destination:service=Queue,name=JbpmCommandQueue</depends>
- <depends>jboss.esb.destination:service=Queue,name=JbpmDLQ</depends>
+ <depends>jboss.jbpm.destination:service=Queue,name=JbpmCommandQueue</depends>
+ <depends>jboss.jbpm.destination:service=Queue,name=JbpmDLQ</depends>
<aop-domain-name>jBPM MDB</aop-domain-name>
</message-driven>
<message-driven>
<ejb-name>JobListenerBean</ejb-name>
- <depends>jboss.esb.destination:service=Queue,name=JbpmJobQueue</depends>
- <depends>jboss.esb.destination:service=Queue,name=JbpmDLQ</depends>
+ <depends>jboss.jbpm.destination:service=Queue,name=JbpmJobQueue</depends>
+ <depends>jboss.jbpm.destination:service=Queue,name=JbpmDLQ</depends>
<aop-domain-name>jBPM MDB</aop-domain-name>
</message-driven>
Copied: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap4x-aop.xml (from rev 6735, jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa4x-aop.xml)
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap4x-aop.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap4x-aop.xml 2011-01-14 20:39:39 UTC (rev 6882)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop xmlns="urn:jboss:aop-beans:1.0">
+ <!-- Override the default pooling. Should be high for jBPM. -->
+ <domain name="jBPM Stateless" extends="Stateless Bean" inheritBindings="true">
+ <annotation expr="class((a)org.jboss.annotation.ejb.PoolClass)">
+ @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=200, timeout=10000)
+ </annotation>
+ </domain>
+
+ <!-- Override the default pooling. Should be high for jBPM. -->
+ <domain name="jBPM MDB" extends="Message Driven Bean" inheritBindings="true">
+ <annotation expr="class((a)org.jboss.annotation.ejb.PoolClass)">
+ @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=200, timeout=10000)
+ </annotation>
+ </domain>
+</aop>
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap4x-aop.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap5x-aop.xml (from rev 6735, jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa5x-aop.xml)
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap5x-aop.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap5x-aop.xml 2011-01-14 20:39:39 UTC (rev 6882)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop xmlns="urn:jboss:aop-beans:1.0">
+
+ <!-- Override the default pooling. Should be high for jBPM. -->
+ <domain name="jBPM Stateless" extends="Stateless Bean" inheritBindings="true">
+ <annotation expr="class((a)org.jboss.ejb3.annotation.Pool)">
+ @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=200, timeout=10000)
+ </annotation>
+ </domain>
+
+ <!-- Override the default pooling. Should be high for jBPM. -->
+ <domain name="jBPM MDB" extends="Message Driven Bean" inheritBindings="true">
+ <annotation expr="class((a)org.jboss.ejb3.annotation.Pool)">
+ @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=200, timeout=10000)
+ </annotation>
+ </domain>
+</aop>
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-eap5x-aop.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa4x-aop.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa4x-aop.xml 2011-01-13 10:08:50 UTC (rev 6881)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa4x-aop.xml 2011-01-14 20:39:39 UTC (rev 6882)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<aop xmlns="urn:jboss:aop-beans:1.0">
- <!-- Override the default pooling. Should be high for jBPM. -->
- <domain name="jBPM Stateless" extends="Stateless Bean" inheritBindings="true">
- <annotation expr="class((a)org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=200, timeout=10000)
- </annotation>
- </domain>
-
- <!-- Override the default pooling. Should be high for jBPM. -->
- <domain name="jBPM MDB" extends="Message Driven Bean" inheritBindings="true">
- <annotation expr="class((a)org.jboss.annotation.ejb.PoolClass)">
- @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=200, timeout=10000)
- </annotation>
- </domain>
-</aop>
-
Deleted: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa5x-aop.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa5x-aop.xml 2011-01-13 10:08:50 UTC (rev 6881)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/resources/jbpm-soa5x-aop.xml 2011-01-14 20:39:39 UTC (rev 6882)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<aop xmlns="urn:jboss:aop-beans:1.0">
-
- <!-- Override the default pooling. Should be high for jBPM. -->
- <domain name="jBPM Stateless" extends="Stateless Bean" inheritBindings="true">
- <annotation expr="class((a)org.jboss.ejb3.annotation.Pool)">
- @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=200, timeout=10000)
- </annotation>
- </domain>
-
- <!-- Override the default pooling. Should be high for jBPM. -->
- <domain name="jBPM MDB" extends="Message Driven Bean" inheritBindings="true">
- <annotation expr="class((a)org.jboss.ejb3.annotation.Pool)">
- @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=200, timeout=10000)
- </annotation>
- </domain>
-</aop>
-
13 years, 3 months
JBoss JBPM SVN: r6881 - jbpm3/branches/jbpm-3.2-soa/distribution.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2011-01-13 05:08:50 -0500 (Thu, 13 Jan 2011)
New Revision: 6881
Modified:
jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml
Log:
Commit a patch from dpalmer for a trival modification
Modified: jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml 2011-01-11 04:58:23 UTC (rev 6880)
+++ jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml 2011-01-13 10:08:50 UTC (rev 6881)
@@ -288,7 +288,6 @@
<goal>izpack</goal>
</goals>
<configuration>
- <attach>false</attach>
<descriptor>${project.build.outputDirectory}/install-definition.xml</descriptor>
<descriptorEncoding>${project.build.sourceEncoding}</descriptorEncoding>
<kind>installer</kind>
13 years, 3 months
JBoss JBPM SVN: r6880 - in jbpm3/branches/jbpm-3.2-soa: core/src/main/java/org/jbpm/context/exe and 17 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2011-01-10 23:58:23 -0500 (Mon, 10 Jan 2011)
New Revision: 6880
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/bytes/ByteBlockChopper.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/context/exe/JbpmType.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/hibernate/Converters.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/action/ActionTypes.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/def/ProcessDefinition.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/NodeTypes.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/UserCodeInterceptorConfig.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/Job.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/par/ProcessArchive.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/security/authentication/SubjectAuthenticationService.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/TaskMailTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties
jbpm3/branches/jbpm-3.2-soa/simulation/src/main/java/org/jbpm/sim/def/JbpmSimulationModel.java
Log:
SOA-2416 restore ability to combine external mail properties and property jbpm.mail.from.address
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/bytes/ByteBlockChopper.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/bytes/ByteBlockChopper.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/bytes/ByteBlockChopper.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
/**
* is used by {@link org.jbpm.bytes.ByteArray} to chop a byte arrays into a list of chunks and
@@ -46,7 +46,7 @@
public static List chopItUp(byte[] byteArray) {
List bytes = null;
if (byteArray != null) {
- int blockSize = JbpmConfiguration.Configs.getInt("jbpm.byte.block.size");
+ int blockSize = Configs.getInt("jbpm.byte.block.size");
int byteCount = byteArray.length;
if (byteCount > blockSize) {
if (log.isTraceEnabled()) log.trace("chopping up " + byteCount + " bytes");
@@ -85,7 +85,7 @@
if (log.isTraceEnabled()) log.trace("no need to glue " + byteArray.length + " bytes");
break;
default:
- int blockSize = JbpmConfiguration.Configs.getInt("jbpm.byte.block.size");
+ int blockSize = Configs.getInt("jbpm.byte.block.size");
byte[] lastBlock = (byte[]) byteBlocks.get(blockCount - 1);
int byteCount = blockSize * (blockCount - 1) + lastBlock.length;
if (log.isTraceEnabled()) log.trace("gluing " + byteCount + " bytes back together");
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/context/exe/JbpmType.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/context/exe/JbpmType.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/context/exe/JbpmType.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -26,14 +26,14 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmException;
import org.jbpm.configuration.ObjectFactory;
import org.jbpm.configuration.ObjectFactoryParser;
import org.jbpm.util.ClassLoaderUtil;
/**
- * specifies how jbpm is able to persist objects of a given type in the database.
+ * specifies how jbpm can persist objects of a given type in the database.
*/
public class JbpmType {
@@ -69,11 +69,11 @@
}
public static List getJbpmTypes() {
- if (JbpmConfiguration.Configs.hasObject("jbpm.types")) {
- return (List) JbpmConfiguration.Configs.getObject("jbpm.types");
+ if (Configs.hasObject("jbpm.types")) {
+ return (List) Configs.getObject("jbpm.types");
}
- String resource = JbpmConfiguration.Configs.getString("resource.varmapping");
+ String resource = Configs.getString("resource.varmapping");
synchronized (typesByResource) {
List types = (List) typesByResource.get(resource);
if (types == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -39,7 +39,7 @@
import org.hibernate.type.LongType;
import org.hibernate.type.StringType;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmException;
import org.jbpm.util.ClassLoaderUtil;
import org.jbpm.util.JndiUtil;
@@ -63,8 +63,8 @@
private static String jndiName = getJndiName();
private static String getJndiName() {
- if (JbpmConfiguration.Configs.hasObject("jbpm.session.factory.jndi.name")) {
- return JbpmConfiguration.Configs.getString("jbpm.session.factory.jndi.name");
+ if (Configs.hasObject("jbpm.session.factory.jndi.name")) {
+ return Configs.getString("jbpm.session.factory.jndi.name");
}
return null;
}
@@ -122,7 +122,7 @@
}
private static String getConfigResource() {
- return JbpmConfiguration.Configs.getString("resource.hibernate.cfg.xml");
+ return Configs.getString("resource.hibernate.cfg.xml");
}
public static Configuration createConfiguration() {
@@ -141,8 +141,8 @@
// check if the properties in the hibernate.cfg.xml need to be overwritten by a separate
// properties file.
- if (JbpmConfiguration.Configs.hasObject("resource.hibernate.properties")) {
- String propertiesResource = JbpmConfiguration.Configs.getString("resource.hibernate.properties");
+ if (Configs.hasObject("resource.hibernate.properties")) {
+ String propertiesResource = Configs.getString("resource.hibernate.properties");
if (log.isDebugEnabled()) {
log.debug("loading hibernate properties from resource: " + propertiesResource);
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/hibernate/Converters.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/hibernate/Converters.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/db/hibernate/Converters.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmException;
import org.jbpm.context.exe.Converter;
import org.jbpm.util.ClassLoaderUtil;
@@ -68,7 +68,7 @@
}
private static Map getConverters() {
- String resource = JbpmConfiguration.Configs.getString("resource.converter");
+ String resource = Configs.getString("resource.converter");
synchronized (convertersByResource) {
Map converters = (Map) convertersByResource.get(resource);
if (converters == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/action/ActionTypes.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/action/ActionTypes.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/action/ActionTypes.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -32,7 +32,7 @@
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.util.ClassLoaderUtil;
import org.jbpm.util.XmlUtil;
@@ -66,7 +66,7 @@
}
private static Map getTypes() {
- String resource = JbpmConfiguration.Configs.getString("resource.action.types");
+ String resource = Configs.getString("resource.action.types");
synchronized (typesByResource) {
Map types = (Map) typesByResource.get(resource);
if (types == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/def/ProcessDefinition.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/def/ProcessDefinition.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/def/ProcessDefinition.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -38,7 +38,7 @@
import org.apache.commons.logging.LogFactory;
import org.xml.sax.InputSource;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.context.def.ContextDefinition;
@@ -127,7 +127,7 @@
}
private static List getModuleClasses() {
- String resource = JbpmConfiguration.Configs.getString("resource.default.modules");
+ String resource = Configs.getString("resource.default.modules");
synchronized (moduleClassesByResource) {
List moduleClasses = (List) moduleClassesByResource.get(resource);
if (moduleClasses == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/NodeTypes.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/NodeTypes.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/NodeTypes.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -32,7 +32,7 @@
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.util.ClassLoaderUtil;
import org.jbpm.util.XmlUtil;
@@ -62,7 +62,7 @@
}
private static Map getTypes() {
- String resource = JbpmConfiguration.Configs.getString("resource.node.types");
+ String resource = Configs.getString("resource.node.types");
synchronized (typesByResource) {
Map types = (Map) typesByResource.get(resource);
if (types == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/UserCodeInterceptorConfig.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/UserCodeInterceptorConfig.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/UserCodeInterceptorConfig.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -1,6 +1,6 @@
package org.jbpm.instantiation;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
public class UserCodeInterceptorConfig {
@@ -12,9 +12,8 @@
public static UserCodeInterceptor getUserCodeInterceptor() {
return userCodeInterceptor != null ? userCodeInterceptor
- : JbpmConfiguration.Configs.hasObject("jbpm.user.code.interceptor") ?
- (UserCodeInterceptor) JbpmConfiguration.Configs.getObject("jbpm.user.code.interceptor")
- : null;
+ : Configs.hasObject("jbpm.user.code.interceptor") ?
+ (UserCodeInterceptor) Configs.getObject("jbpm.user.code.interceptor") : null;
}
/** @deprecated Use the configuration entry <code>jbpm.user.code.interceptor</code> instead */
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/Job.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/Job.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/Job.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -3,7 +3,7 @@
import java.io.Serializable;
import java.util.Date;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmContext;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
@@ -29,7 +29,7 @@
private Date lockTime;
private String exception;
- private int retries = JbpmConfiguration.Configs.getInt("jbpm.job.retries");
+ private int retries = Configs.getInt("jbpm.job.retries");
private String configuration;
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -1,6 +1,6 @@
package org.jbpm.jpdl.el.impl;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.Token;
@@ -47,10 +47,6 @@
if (swimlaneInstance != null) return swimlaneInstance.getActorId();
}
- if (JbpmConfiguration.Configs.hasObject(name)) {
- return JbpmConfiguration.Configs.getObject(name);
- }
-
- return null;
+ return Configs.hasObject(name) ? Configs.getObject(name) : null;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/par/ProcessArchive.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/par/ProcessArchive.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/par/ProcessArchive.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -37,7 +37,7 @@
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.jpdl.JpdlException;
import org.jbpm.jpdl.xml.Problem;
@@ -122,7 +122,7 @@
}
private static List getParsers() {
- String resource = JbpmConfiguration.Configs.getString("resource.parsers");
+ String resource = Configs.getString("resource.parsers");
synchronized (parsersByResource) {
List parsers = (List) parsersByResource.get(resource);
if (parsers == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -4,7 +4,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -44,7 +43,7 @@
private String subject;
private String text;
- private ExecutionContext executionContext;
+ private transient ExecutionContext executionContext;
private static final long serialVersionUID = 2L;
@@ -75,55 +74,61 @@
send();
}
- public List getRecipients() {
- List recipients = new ArrayList();
- if (actors != null) recipients.addAll(evaluateActors(actors));
- if (to != null) recipients.addAll(evaluateAddresses(to));
- return recipients;
+ public Collection getRecipients() {
+ return collectRecipients(actors, to);
}
- public List getCcRecipients() {
- List recipients = new ArrayList();
- if (ccActors != null) recipients.addAll(evaluateActors(ccActors));
- if (cc != null) recipients.addAll(evaluateAddresses(cc));
- return recipients;
+ public Collection getCcRecipients() {
+ return collectRecipients(ccActors, cc);
}
- public List getBccRecipients() {
- List recipients = new ArrayList();
- if (bccActors != null) recipients.addAll(evaluateActors(bccActors));
- if (bcc != null) recipients.addAll(evaluateAddresses(bcc));
+ public Collection getBccRecipients() {
+ Collection recipients = collectRecipients(bccActors, bcc);
if (Configs.hasObject("jbpm.mail.bcc.address")) {
+ if (!(recipients instanceof ArrayList)) recipients = new ArrayList(recipients);
recipients.addAll(tokenize(Configs.getString("jbpm.mail.bcc.address")));
}
return recipients;
}
+ private Collection collectRecipients(String actors, String addresses) {
+ if (actors != null) {
+ if (addresses != null) {
+ Collection recipients = new ArrayList(evaluateActors(actors));
+ recipients.addAll(evaluateAddresses(addresses));
+ return recipients;
+ }
+ return evaluateActors(actors);
+ }
+ else if (addresses != null) {
+ return evaluateAddresses(addresses);
+ }
+ return null;
+ }
+
private Collection evaluateActors(String expression) {
Object value = evaluate(expression, Object.class);
- List actors;
+ Collection actorIds;
if (value instanceof String) {
- actors = tokenize((String) value);
+ actorIds = tokenize((String) value);
}
+ else if (value instanceof Collection) {
+ actorIds = (Collection) value;
+ }
else if (value instanceof String[]) {
- actors = Arrays.asList((String[]) value);
+ actorIds = Arrays.asList((String[]) value);
}
- else if (value instanceof List) {
- actors = (List) value;
- }
- else if (value instanceof Collection) {
- actors = new ArrayList((Collection) value);
- }
else {
- throw new JbpmException("could not resolve actors from expression: " + expression);
+ throw new JbpmException(expression + " returned " + value
+ + " instead of comma-separated string, string array or collection");
}
- return resolveAddresses(actors);
+ return resolveAddresses(actorIds);
}
- protected Collection resolveAddresses(List actorIds) {
+ protected Collection resolveAddresses(Collection actorIds) {
AddressResolver addressResolver = (AddressResolver) Configs.getObject("jbpm.mail.address.resolver");
- List addresses = new ArrayList();
+ Collection addresses = new ArrayList();
for (Iterator iter = actorIds.iterator(); iter.hasNext();) {
String actorId = (String) iter.next();
Object result = addressResolver.resolveAddress(actorId);
@@ -151,8 +156,8 @@
private Collection evaluateAddresses(String expression) {
Object value = evaluate(expression, Object.class);
if (value instanceof String) return tokenize((String) value);
+ if (value instanceof Collection) return (Collection) value;
if (value instanceof String[]) return Arrays.asList((String[]) value);
- if (value instanceof Collection) return (Collection) value;
// give up
throw new JbpmException(expression + " returned " + value
+ " instead of comma-separated string, string array or collection");
@@ -176,7 +181,8 @@
}
public String getFromAddress() {
- return Configs.getString("jbpm.mail.from.address");
+ return Configs.hasObject("jbpm.mail.from.address") ?
+ Configs.getString("jbpm.mail.from.address") : null;
}
public void send() {
@@ -193,44 +199,46 @@
if (text == null) text = templateProperties.getProperty("text");
}
- List recipients = getRecipients();
- List ccRecipients = getCcRecipients();
- List bccRecipients = getBccRecipients();
- if (recipients.isEmpty() && ccRecipients.isEmpty() && bccRecipients.isEmpty()) return;
+ String sender = getFromAddress();
+ Collection recipients = getRecipients();
+ Collection ccRecipients = getCcRecipients();
+ Collection bccRecipients = getBccRecipients();
+ if (nullOrEmpty(recipients) && nullOrEmpty(ccRecipients) && nullOrEmpty(bccRecipients))
+ return;
String subject = getSubject();
String text = getText();
if (log.isDebugEnabled()) {
- StringBuffer detail = new StringBuffer("sending email to ");
- detail.append(recipients);
- if (!ccRecipients.isEmpty()) detail.append(" cc ").append(ccRecipients);
- if (!bccRecipients.isEmpty()) detail.append(" bcc ").append(bccRecipients);
+ StringBuffer detail = new StringBuffer("sending email");
+ if (!nullOrEmpty(recipients)) detail.append(" to ").append(recipients);
+ if (!nullOrEmpty(ccRecipients)) detail.append(" cc ").append(ccRecipients);
+ if (!nullOrEmpty(bccRecipients)) detail.append(" bcc ").append(bccRecipients);
if (subject != null) detail.append(" about '").append(subject).append('\'');
log.debug(detail.toString());
}
Session session = Session.getInstance(getServerProperties());
- for (int retries = 3; retries >= 0; retries--) {
+ for (int retries = 4; retries >= 0; retries--) {
try {
- sendMailInternal(session, recipients, ccRecipients, bccRecipients, subject, text);
+ sendInternal(session, sender, recipients, ccRecipients, bccRecipients, subject, text);
break;
}
catch (MessagingException me) {
- if (retries == 0) throw new JbpmException("cannot send email", me);
- log.warn("cannot send mail (" + retries + " retries left): " + me.getMessage());
+ if (retries == 0) throw new JbpmException("failed to send email", me);
+ log.warn("failed to send email (" + retries + " retries left): " + me.getMessage());
}
}
}
- public static void send(Properties serverProperties, String fromAddress, List recipients,
+ public static void send(Properties serverProperties, String sender, Collection recipients,
String subject, String text) {
- send(serverProperties, fromAddress, recipients, Collections.EMPTY_LIST, subject, text);
+ send(serverProperties, sender, recipients, null, subject, text);
}
- public static void send(Properties serverProperties, String fromAddress, List recipients,
- List bccRecipients, String subject, String text) {
- if (recipients.isEmpty() && bccRecipients.isEmpty()) return;
+ public static void send(Properties serverProperties, String sender, Collection recipients,
+ Collection bccRecipients, String subject, String text) {
+ if (nullOrEmpty(recipients) && nullOrEmpty(bccRecipients)) return;
if (log.isDebugEnabled()) {
StringBuffer detail = new StringBuffer("sending email to ");
@@ -241,27 +249,40 @@
}
Session session = Session.getInstance(serverProperties);
- for (int retries = 3; retries >= 0; retries--) {
+ for (int retries = 4; retries >= 0; retries--) {
try {
- sendMailInternal(session, recipients, null, bccRecipients, subject, text);
+ sendInternal(session, null, recipients, null, bccRecipients, subject, text);
break;
}
catch (MessagingException me) {
- if (retries == 0) throw new JbpmException("cannot send email", me);
- log.warn("cannot send mail (" + retries + " retries left): " + me.getMessage());
+ if (retries == 0) throw new JbpmException("failed to send email", me);
+ log.warn("failed to send email (" + retries + " retries left): " + me.getMessage());
}
}
}
- private static void sendMailInternal(Session session, List recipients, List ccRecipients,
- List bccRecipients, String subject, String text) throws MessagingException {
+ private static boolean nullOrEmpty(Collection col) {
+ return col == null || col.isEmpty();
+ }
+
+ private static void sendInternal(Session session, String sender, Collection recipients,
+ Collection ccRecipients, Collection bccRecipients, String subject, String text)
+ throws MessagingException {
MimeMessage message = new MimeMessage(session);
- // from - specified in the "mail.from" property
- message.setFrom();
+ // from
+ if (sender != null) {
+ message.setFrom(new InternetAddress(sender));
+ }
+ else {
+ // read sender from session property "mail.from"
+ message.setFrom();
+ }
// to
- for (Iterator iter = recipients.iterator(); iter.hasNext();) {
- InternetAddress recipient = new InternetAddress((String) iter.next());
- message.addRecipient(Message.RecipientType.TO, recipient);
+ if (recipients != null) {
+ for (Iterator iter = recipients.iterator(); iter.hasNext();) {
+ InternetAddress recipient = new InternetAddress((String) iter.next());
+ message.addRecipient(Message.RecipientType.TO, recipient);
+ }
}
// cc
if (ccRecipients != null) {
@@ -293,9 +314,10 @@
if (Configs.hasObject("resource.mail.properties")) {
String resource = Configs.getString("resource.mail.properties");
synchronized (serverPropertiesByResource) {
+ // look in server properties cache
serverProperties = (Properties) serverPropertiesByResource.get(resource);
if (serverProperties == null) {
- // load mail properties
+ // load server properties and put them in the cache
serverProperties = ClassLoaderUtil.getProperties(resource);
serverPropertiesByResource.put(resource, serverProperties);
}
@@ -313,9 +335,6 @@
int port = Configs.getInt("jbpm.mail.smtp.port");
serverProperties.setProperty("mail.smtp.port", Integer.toString(port));
}
- // from
- String from = getFromAddress();
- serverProperties.setProperty("mail.from", from);
}
return serverProperties;
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -29,7 +29,8 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.tool.hbm2ddl.SchemaExport;
-import org.jbpm.JbpmConfiguration;
+
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.db.JbpmSchema;
import org.jbpm.db.hibernate.HibernateHelper;
import org.jbpm.svc.Service;
@@ -64,12 +65,12 @@
public synchronized Configuration getConfiguration() {
if (configuration == null) {
String hibernateCfgXmlResource = null;
- if (JbpmConfiguration.Configs.hasObject("resource.hibernate.cfg.xml")) {
- hibernateCfgXmlResource = JbpmConfiguration.Configs.getString("resource.hibernate.cfg.xml");
+ if (Configs.hasObject("resource.hibernate.cfg.xml")) {
+ hibernateCfgXmlResource = Configs.getString("resource.hibernate.cfg.xml");
}
String hibernatePropertiesResource = null;
- if (JbpmConfiguration.Configs.hasObject("resource.hibernate.properties")) {
- hibernatePropertiesResource = JbpmConfiguration.Configs.getString("resource.hibernate.properties");
+ if (Configs.hasObject("resource.hibernate.properties")) {
+ hibernatePropertiesResource = Configs.getString("resource.hibernate.properties");
}
configuration = HibernateHelper.createConfiguration(hibernateCfgXmlResource, hibernatePropertiesResource);
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/security/authentication/SubjectAuthenticationService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/security/authentication/SubjectAuthenticationService.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/security/authentication/SubjectAuthenticationService.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -30,7 +30,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.security.AuthenticationService;
@@ -63,19 +63,19 @@
initPrincipalClass(principalClassName);
}
else {
- initPrincipalClass(JbpmConfiguration.Configs.getString("jbpm.authenticator.principal.classname"));
+ initPrincipalClass(Configs.getString("jbpm.authenticator.principal.classname"));
}
if (allowActorIdOverwrite != null) {
this.allowActorIdOverwrite = allowActorIdOverwrite.booleanValue();
}
else {
- this.allowActorIdOverwrite = JbpmConfiguration.Configs.getBoolean("jbpm.authenticator.principal.allow.overwrite");
+ this.allowActorIdOverwrite = Configs.getBoolean("jbpm.authenticator.principal.allow.overwrite");
}
}
public SubjectAuthenticationService() {
- initPrincipalClass(JbpmConfiguration.Configs.getString("jbpm.authenticator.principal.classname"));
- allowActorIdOverwrite = JbpmConfiguration.Configs.getBoolean("jbpm.authenticator.principal.allow.overwrite");
+ initPrincipalClass(Configs.getString("jbpm.authenticator.principal.classname"));
+ allowActorIdOverwrite = Configs.getBoolean("jbpm.authenticator.principal.allow.overwrite");
}
protected void initPrincipalClass(String principalClassName) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/taskmgmt/exe/TaskMgmtInstance.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -335,8 +335,8 @@
private TaskInstance instantiateNewTaskInstance(ExecutionContext executionContext) {
if (Configs.hasObject("jbpm.task.instance.factory")) {
- TaskInstanceFactory factory = (TaskInstanceFactory) Configs
- .getObject("jbpm.task.instance.factory");
+ TaskInstanceFactory factory =
+ (TaskInstanceFactory) Configs.getObject("jbpm.task.instance.factory");
return factory.createTaskInstance(executionContext);
}
return new TaskInstance();
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -28,7 +28,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmException;
import org.jbpm.configuration.ObjectFactory;
@@ -89,7 +89,7 @@
* </ul>
*/
public static ClassLoader getClassLoader() {
- ObjectFactory objectFactory = JbpmConfiguration.Configs.getObjectFactory();
+ ObjectFactory objectFactory = Configs.getObjectFactory();
if (objectFactory.hasObject("jbpm.class.loader")) {
String classLoader = (String) objectFactory.createObject("jbpm.class.loader");
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -33,6 +33,7 @@
+ "<jbpm-configuration>"
+ " <jbpm-context />"
+ " <string name='resource.mail.properties' value='org/jbpm/mail/test.mail.properties' />"
+ + " <string name='jbpm.mail.from.address' value='workflow(a)redhat.com' /> "
+ " <bean name='jbpm.mail.address.resolver' class='"
+ TestAddressResolver.class.getName()
+ "' singleton='true' />"
@@ -400,9 +401,7 @@
private static final long serialVersionUID = 1L;
public Object resolveAddress(String actorId) {
- if ("ghost".equals(actorId)) {
- return null;
- }
+ if ("ghost".equals(actorId)) return null;
return actorId + "@example.domain";
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/TaskMailTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/TaskMailTest.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/TaskMailTest.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -5,21 +5,17 @@
import java.util.Arrays;
import java.util.List;
-import javax.mail.MessagingException;
import javax.mail.Message.RecipientType;
+import javax.mail.MessagingException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import junit.framework.Test;
-import org.subethamail.wiser.Wiser;
-import org.subethamail.wiser.WiserMessage;
-
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.instantiation.Delegation;
@@ -28,10 +24,10 @@
import org.jbpm.svc.Service;
import org.jbpm.svc.ServiceFactory;
import org.jbpm.svc.Services;
-import org.jbpm.taskmgmt.def.AssignmentHandler;
-import org.jbpm.taskmgmt.exe.Assignable;
import org.jbpm.taskmgmt.exe.TaskInstance;
import org.jbpm.taskmgmt.exe.TaskMgmtInstance;
+import org.subethamail.wiser.Wiser;
+import org.subethamail.wiser.WiserMessage;
public class TaskMailTest extends AbstractJbpmTestCase {
@@ -189,15 +185,6 @@
assertEquals(1, testSchedulerService.cancelledTimers.size());
}
- public static class GhostAssigner implements AssignmentHandler {
- private static final long serialVersionUID = 1L;
-
- public void assign(Assignable assignable, ExecutionContext executionContext)
- throws Exception {
- assignable.setActorId("ghost");
- }
- }
-
public void testUnexistingUser() throws Exception {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("<process-definition>"
+ " <start-state>"
@@ -205,9 +192,7 @@
+ " </start-state>"
+ " <task-node name='a'>"
+ " <task name='laundry' notify='true'>"
- + " <assignment class='"
- + GhostAssigner.class.getName()
- + "' />"
+ + " <assignment actor-id='ghost' />"
+ " </task>"
+ " <transition to='b' />"
+ " </task-node>"
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties 2011-01-11 04:58:23 UTC (rev 6880)
@@ -1,3 +1,2 @@
mail.smtp.host = localhost
mail.smtp.port = 2525
-mail.from = workflow(a)redhat.com
\ No newline at end of file
Modified: jbpm3/branches/jbpm-3.2-soa/simulation/src/main/java/org/jbpm/sim/def/JbpmSimulationModel.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/simulation/src/main/java/org/jbpm/sim/def/JbpmSimulationModel.java 2010-12-23 02:29:52 UTC (rev 6879)
+++ jbpm3/branches/jbpm-3.2-soa/simulation/src/main/java/org/jbpm/sim/def/JbpmSimulationModel.java 2011-01-11 04:58:23 UTC (rev 6880)
@@ -11,7 +11,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.graph.def.Node;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.def.Transition;
@@ -162,7 +162,7 @@
// set the jBPM-Clock and register it to be controlled by the real simulation clock
// TODO: Only do that, if the clock isn't already created, e.g. by JbpmExperiment
JbpmSimulationClock jbpmClock =
- (JbpmSimulationClock) JbpmConfiguration.Configs.getObject("jbpm.date.generator");
+ (JbpmSimulationClock) Configs.getObject("jbpm.date.generator");
getExperiment().getSimClock().addObserver(jbpmClock);
}
13 years, 3 months