[jbpm-commits] JBoss JBPM SVN: r4801 - jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue May 12 16:49:42 EDT 2009
Author: ainze
Date: 2009-05-12 16:49:42 -0400 (Tue, 12 May 2009)
New Revision: 4801
Modified:
jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java
Log:
don't add to standard transaction when using current.
Modified: jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java
===================================================================
--- jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java 2009-05-12 20:48:59 UTC (rev 4800)
+++ jbpm4/branches/ainze/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java 2009-05-12 20:49:42 UTC (rev 4801)
@@ -83,7 +83,10 @@
}
StandardTransaction standardTransaction = environment.get(StandardTransaction.class);
- if (standardTransaction!=null) {
+
+ //(aninz) Checking on useCurrent. It does not make sense for instance to close the session
+ //if you have no way of opening it again.
+ if (standardTransaction!=null && useCurrent != true) {
HibernateSessionResource hibernateSessionResource = new HibernateSessionResource(session);
standardTransaction.enlistResource(hibernateSessionResource);
}
More information about the jbpm-commits
mailing list