Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 098DCDEF6 for ; Sun, 19 May 2013 22:29:59 +0000 (UTC) Received: (qmail 95059 invoked by uid 500); 19 May 2013 22:29:59 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 95033 invoked by uid 500); 19 May 2013 22:29:59 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 95024 invoked by uid 500); 19 May 2013 22:29:59 -0000 Received: (qmail 95019 invoked by uid 99); 19 May 2013 22:29:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 May 2013 22:29:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 May 2013 22:29:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 099CC2388A29; Sun, 19 May 2013 22:29:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1484364 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Transaction.java Date: Sun, 19 May 2013 22:29:37 -0000 To: torque-commits@db.apache.org From: tfischer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130519222938.099CC2388A29@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tfischer Date: Sun May 19 22:29:37 2013 New Revision: 1484364 URL: http://svn.apache.org/r1484364 Log: TORQUE-287 add method Transaction.getTransactionManager() use final modifier in method parameters Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Transaction.java Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Transaction.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Transaction.java?rev=1484364&r1=1484363&r2=1484364&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Transaction.java (original) +++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Transaction.java Sun May 19 22:29:37 2013 @@ -35,7 +35,7 @@ import org.apache.torque.TorqueException */ public final class Transaction { - /** The transaction manager to sue. */ + /** The transaction manager to use. */ private static TransactionManager transactionManager; /** @@ -55,12 +55,22 @@ public final class Transaction * @param transactionManager the transaction manager to use. */ public static void setTransactionManager( - TransactionManager transactionManager) + final TransactionManager transactionManager) { Transaction.transactionManager = transactionManager; } /** + * Returns the current transaction manager. + * + * @return the current transaction manager. + */ + public static TransactionManager getTransactionManager() + { + return transactionManager; + } + + /** * Begin a transaction by retrieving a connection from the default database * connection pool. * WARNING: If the database does not support transaction or the pool has set @@ -89,7 +99,7 @@ public final class Transaction * * @throws TorqueException If the connection cannot be retrieved. */ - public static Connection begin(String dbName) throws TorqueException + public static Connection begin(final String dbName) throws TorqueException { return transactionManager.begin(dbName); } @@ -104,7 +114,7 @@ public final class Transaction * @throws TorqueException Any exceptions caught during processing will be * rethrown wrapped into a TorqueException. */ - public static void commit(Connection con) throws TorqueException + public static void commit(final Connection con) throws TorqueException { transactionManager.commit(con); } @@ -119,7 +129,7 @@ public final class Transaction * @throws TorqueException Any exceptions caught during processing will be * rethrown wrapped into a TorqueException. */ - public static void rollback(Connection con) throws TorqueException + public static void rollback(final Connection con) throws TorqueException { transactionManager.rollback(con); } @@ -132,7 +142,7 @@ public final class Transaction * @param con The Connection for the transaction. * @see Transaction#rollback(Connection) */ - public static void safeRollback(Connection con) + public static void safeRollback(final Connection con) { transactionManager.safeRollback(con); } --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org