[jbpm-commits] JBoss JBPM SVN: r2742 - projects/spec/branches/tdiesler/modules/ri/src/main/java/org/jbpm/ri/runtime.
do-not-reply at jboss.org
do-not-reply at jboss.org
Sat Nov 1 08:04:46 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-11-01 08:04:46 -0400 (Sat, 01 Nov 2008)
New Revision: 2742
Added:
projects/spec/branches/tdiesler/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionAssociation.java
Log:
wip
Added: projects/spec/branches/tdiesler/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionAssociation.java
===================================================================
--- projects/spec/branches/tdiesler/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionAssociation.java (rev 0)
+++ projects/spec/branches/tdiesler/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionAssociation.java 2008-11-01 12:04:46 UTC (rev 2742)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.ri.runtime;
+
+//$Id$
+
+import org.hibernate.Transaction;
+
+/**
+ * A thread local association for the current transaction
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 01-Nov-2008
+ */
+public class TransactionAssociation
+{
+ private static final ThreadLocal<Transaction> txAssociation = new ThreadLocal<Transaction>();
+
+ public static void setTransaction(Transaction tx)
+ {
+ txAssociation.set(tx);
+ }
+
+ public static Transaction getTransaction()
+ {
+ return txAssociation.get();
+ }
+}
\ No newline at end of file
Property changes on: projects/spec/branches/tdiesler/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionAssociation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jbpm-commits
mailing list