Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 62569 invoked from network); 28 Mar 2007 00:43:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Mar 2007 00:43:53 -0000 Received: (qmail 4333 invoked by uid 500); 28 Mar 2007 00:44:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 4114 invoked by uid 500); 28 Mar 2007 00:44:00 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 4105 invoked by uid 99); 28 Mar 2007 00:44:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2007 17:44:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2007 17:43:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2CF94714062 for ; Tue, 27 Mar 2007 17:43:32 -0700 (PDT) Message-ID: <469970.1175042612165.JavaMail.jira@brutus> Date: Tue, 27 Mar 2007 17:43:32 -0700 (PDT) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2490) Clarify transaction management in LanguageConnectionContext. In-Reply-To: <9554213.1174953452141.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484664 ] Daniel John Debrunner commented on DERBY-2490: ---------------------------------------------- TransactionController.startNestedUserTransaction() actually has a good write-up on nested transactions. One thing that is somewhat unclear is how many nested read-only transactions can exist. The comments are clear that only 1 non-readOnly nested user transaction can exist, but not clear on the read-only case. > Clarify transaction management in LanguageConnectionContext. > ------------------------------------------------------------ > > Key: DERBY-2490 > URL: https://issues.apache.org/jira/browse/DERBY-2490 > Project: Derby > Issue Type: Sub-task > Components: SQL > Reporter: Daniel John Debrunner > > LanguageConnectionContext has these four methods (as well as other commit/rollback methods) to manage transactions and specifically nested transactions. > void beginNestedTransaction(boolean readOnly) throws StandardException; > void commitNestedTransaction() throws StandardException; > TransactionController getTransactionCompile(); > TransactionController getTransactionExecute(); > getTransactionCompile() returns the same as getTransactionExecute() if not in a nested transaction. > nested transactions started out as "compile time" transactions but are now used at runtime, for example in permission lookup and identity columns(?), > thus the name getTransactionCompile() can confuse readers. > A cleaner api might be to just have a single getTransaction() method that returns the current transaction, which is main transaction (non-nested) except > between calls to > beginNestedTransaction() > commitNestedTransaction() > I think that is the logic today, one one transaction is active, either the nested one of the main one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.