[jbpm-commits] JBoss JBPM SVN: r5523 - jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Aug 24 17:18:02 EDT 2009


Author: ainze
Date: 2009-08-24 17:18:02 -0400 (Mon, 24 Aug 2009)
New Revision: 5523

Modified:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java
Log:
JBPM-2445 : integration with spring 1.2. 

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java	2009-08-24 16:12:20 UTC (rev 5522)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java	2009-08-24 21:18:02 UTC (rev 5523)
@@ -30,7 +30,6 @@
 import org.jbpm.pvm.internal.svc.Interceptor;
 import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.TransactionDefinition;
-import org.springframework.transaction.support.DefaultTransactionDefinition;
 import org.springframework.transaction.support.TransactionCallback;
 import org.springframework.transaction.support.TransactionTemplate;
 
@@ -65,16 +64,15 @@
     }
 
     try {
-      DefaultTransactionDefinition definition = new DefaultTransactionDefinition();
+    	
+      TransactionTemplate template = new TransactionTemplate(platformTransactionManager);
 
-
       if (useCurrent) {
-        definition.setPropagationBehavior(TransactionDefinition.PROPAGATION_MANDATORY);
+    	  template.setPropagationBehavior(TransactionDefinition.PROPAGATION_MANDATORY);
       } else {
-    	  definition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
+    	  template.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
       }
 
-      TransactionTemplate template = new TransactionTemplate(platformTransactionManager, definition);
       TransactionCallback transactionCallback = new CommandTransactionCallback<T>(command, next, platformTransactionManager);
       T t = (T) template.execute(transactionCallback);
 



More information about the jbpm-commits mailing list