[jbpm-commits] JBoss JBPM SVN: r5488 - in jbpm4/branches/tbaeyens/modules: pvm/src/main/resources and 3 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Aug 18 06:34:02 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-08-18 06:34:02 -0400 (Tue, 18 Aug 2009)
New Revision: 5488
Modified:
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.tx.cmd.cfg.xml
jbpm4/branches/tbaeyens/modules/test-cfg/src/test/java/org/jbpm/test/hibernatelongid/HibernateLongIdTest.java
jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/logging.properties
jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/org/jbpm/test/hibernatelongid/jbpm.cfg.xml
Log:
fixed command based interceptor stack
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java 2009-08-18 10:20:35 UTC (rev 5487)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java 2009-08-18 10:34:02 UTC (rev 5488)
@@ -33,6 +33,7 @@
import org.jbpm.api.ExecutionService;
import org.jbpm.api.HistoryService;
import org.jbpm.api.IdentityService;
+import org.jbpm.api.JbpmException;
import org.jbpm.api.ManagementService;
import org.jbpm.api.ProcessEngine;
import org.jbpm.api.RepositoryService;
@@ -52,6 +53,9 @@
import org.jbpm.pvm.internal.stream.StreamInput;
import org.jbpm.pvm.internal.stream.StringStreamInput;
import org.jbpm.pvm.internal.stream.UrlStreamInput;
+import org.jbpm.pvm.internal.svc.DefaultCommandService;
+import org.jbpm.pvm.internal.svc.EnvironmentInterceptor;
+import org.jbpm.pvm.internal.tx.StandardTransactionInterceptor;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireDefinition;
import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
@@ -316,10 +320,24 @@
environmentObjects.add(userProvidedEnvironmentObject);
}
+ EnvironmentInterceptor environmentInterceptor = new EnvironmentInterceptor();
+ StandardTransactionInterceptor standardTransactionInterceptor = new StandardTransactionInterceptor();
+ DefaultCommandService defaultCommandService = new DefaultCommandService();
+
+ {
+ environmentInterceptor.setNext(standardTransactionInterceptor);
+ environmentInterceptor.setEnvironmentFactory(this);
+ standardTransactionInterceptor.setNext(defaultCommandService);
+ }
+
public <T> T execute(Command<T> command) {
EnvironmentImpl environment = openEnvironment();
try {
- return get(CommandService.class).execute(command);
+ return environmentInterceptor.execute(command);
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new JbpmException(e.getMessage(), e);
} finally {
environment.close();
}
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.tx.cmd.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.tx.cmd.cfg.xml 2009-08-18 10:20:35 UTC (rev 5487)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.tx.cmd.cfg.xml 2009-08-18 10:34:02 UTC (rev 5488)
@@ -3,9 +3,7 @@
<jbpm-configuration>
<process-engine-context>
- <command-service>
- <standard-transaction-interceptor />
- </command-service>
+ <command-service />
</process-engine-context>
<transaction-context>
Modified: jbpm4/branches/tbaeyens/modules/test-cfg/src/test/java/org/jbpm/test/hibernatelongid/HibernateLongIdTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-cfg/src/test/java/org/jbpm/test/hibernatelongid/HibernateLongIdTest.java 2009-08-18 10:20:35 UTC (rev 5487)
+++ jbpm4/branches/tbaeyens/modules/test-cfg/src/test/java/org/jbpm/test/hibernatelongid/HibernateLongIdTest.java 2009-08-18 10:34:02 UTC (rev 5488)
@@ -38,7 +38,7 @@
/**
- * @author Tom Baeyens
+ * @authorX Tom Baeyens
*/
public class HibernateLongIdTest extends JbpmCustomCfgTestCase {
Modified: jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/logging.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/logging.properties 2009-08-18 10:20:35 UTC (rev 5487)
+++ jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/logging.properties 2009-08-18 10:34:02 UTC (rev 5488)
@@ -1,10 +1,12 @@
handlers= java.util.logging.ConsoleHandler
redirect.commons.logging = enabled
-java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
org.jbpm.level=FINE
+org.jbpm.pvm.internal.tx.level=FINEST
+# org.jbpm.pvm.internal.wire.level=FINEST
# org.jbpm.pvm.internal.tx.level=FINE
# org.jbpm.pvm.internal.wire.level=FINE
# org.jbpm.pvm.internal.util.level=FINE
Modified: jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/org/jbpm/test/hibernatelongid/jbpm.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/org/jbpm/test/hibernatelongid/jbpm.cfg.xml 2009-08-18 10:20:35 UTC (rev 5487)
+++ jbpm4/branches/tbaeyens/modules/test-cfg/src/test/resources/org/jbpm/test/hibernatelongid/jbpm.cfg.xml 2009-08-18 10:34:02 UTC (rev 5488)
@@ -2,7 +2,6 @@
<jbpm-configuration>
- <import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.tx.cmd.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
More information about the jbpm-commits
mailing list