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

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jun 16 15:46:37 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-06-16 15:46:36 -0400 (Tue, 16 Jun 2009)
New Revision: 5045

Removed:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/JtaTransaction.java
Log:
JBPM-2322 enabled module test-db in the integration test suite

Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/JtaTransaction.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/JtaTransaction.java	2009-06-16 19:43:57 UTC (rev 5044)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/JtaTransaction.java	2009-06-16 19:46:36 UTC (rev 5045)
@@ -1,85 +0,0 @@
-/*
- * 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.pvm.internal.tx;
-
-import javax.naming.InitialContext;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-import javax.transaction.TransactionManager;
-import javax.transaction.UserTransaction;
-
-import org.jbpm.api.JbpmException;
-import org.jbpm.api.env.Transaction;
-
-
-/**
- * @author Tom Baeyens
- */
-public class JtaTransaction implements Transaction {
-
-  protected String userTransactionJndiName = "java:comp/UserTransaction";
-  protected String transactionManagerJndiName = "java:/TransactionManager";
-
-  public boolean isRollbackOnly() {
-    try {
-      return getUserTransaction().getStatus()==Status.STATUS_MARKED_ROLLBACK;
-    } catch (SystemException e) {
-      throw new JbpmException("couldn't get status of user transaction", e);
-    }
-  }
-
-  public void setRollbackOnly() {
-    try {
-      getUserTransaction().setRollbackOnly();
-    } catch (Exception e) {
-      throw new JbpmException("couldn't set user transaction to rollback only", e);
-    }
-  }
-
-  public void registerSynchronization(Synchronization synchronization) {
-    try {
-      getJeeTransaction().registerSynchronization(synchronization);
-    } catch (Exception e) {
-      throw new JbpmException("couldn't register synchronization", e);
-    }
-  }
-
-  protected UserTransaction getUserTransaction() {
-    try {
-      InitialContext initialContext = new InitialContext();
-      return (UserTransaction) initialContext.lookup(userTransactionJndiName);
-    } catch (Exception e) {
-      throw new JbpmException("couldn't lookup user transaction at "+userTransactionJndiName, e);
-    }
-  }
-
-  protected javax.transaction.Transaction getJeeTransaction() {
-    try {
-      InitialContext initialContext = new InitialContext();
-      TransactionManager transactionManager = (TransactionManager) initialContext.lookup(transactionManagerJndiName);
-      return transactionManager.getTransaction();
-    } catch (Exception e) {
-      throw new JbpmException("couldn't get transaction from transaction manager "+userTransactionJndiName, e);
-    }
-  }
-}




More information about the jbpm-commits mailing list