Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 27984 invoked from network); 27 Mar 2006 21:33:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Mar 2006 21:33:40 -0000 Received: (qmail 27227 invoked by uid 500); 27 Mar 2006 21:33:39 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 27212 invoked by uid 500); 27 Mar 2006 21:33:38 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 27201 invoked by uid 99); 27 Mar 2006 21:33:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Mar 2006 13:33:38 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 27 Mar 2006 13:33:38 -0800 Received: (qmail 27861 invoked by uid 1977); 27 Mar 2006 21:33:17 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 27 Mar 2006 21:33:17 -0000 Date: Mon, 27 Mar 2006 13:33:17 -0800 (PST) From: Thomas Fischer To: Apache Torque Users List Subject: RE: Torque Connection pool .. ORA- 01453 - Set Transaction must be the first statement In-Reply-To: <8F5843B903F59D4C8C6806BB49A39119062A12@dukece-mail3.dukece.com> Message-ID: <20060327133048.L11116@minotaur.apache.org> References: <8F5843B903F59D4C8C6806BB49A39119062A12@dukece-mail3.dukece.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Rating: localhost 1.6.2 0/1000/N X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Using commits/rollbacks without explicitly startung a connection may look unclean but does not cause any problems in practice (at least none known to me). The problem described seems to be the other way round: there is no rollback/commit where should be one. Thomas On Mon, 27 Mar 2006, Greg Monroe wrote: > I did a quick wander thru the Torque code and saw one thing > that did not look right to me. Here's some background first: > > All of the Torque Transaction handling is built on the > Transaction class. This is used primarily by the BasePeer > methods like doUpdate(Criteria) and the like. > > These methods are the ones that automatically wrap the > DB actions as a transaction with rollback. > > The first thing that didn't look right to me was that the > Transaction.beginOptional(dbName, useTransaction) method > is called with the useTransaction arg set to the value of > criteria.isUseTransation(). This value is set to false by > default. > > So, it seems that if you don't set this explicitly on your > Criteria, you are not using really using transactions but > you still have the Transaction try/catch code with commits and > rollbacks. > > Shouldn't the default for isUseTransactions() be true and/or > the code handle the false condition without calling the > extra transaction methods? > > >> -----Original Message----- >> From: vivek sar [mailto:vivextra@gmail.com] >> Sent: Saturday, March 25, 2006 4:44 AM >> >> Thanks Thomas for detailed explanation. I haven't dig into >> the Torque or dbcp code to tell exactly where the fault lies. >> The way I understand is that the db starts the transaction on >> your behalf if you don't start one. In case that transaction >> fails it will try to rollback. The problem I've stated is >> while the transaction is rolling back the same connection is >> somehow being used by other query and that's causing the >> "ORA-01453" and hanging of the connection. >> >> I would think it's a problem with dbcp if not torque as dbcp >> is the one that handles the connection pool. I couldn't find >> much on the dbcp commons mailing-archiving list, but found >> tons of similar problems reported by torque users, so I think >> most of the people do assume it's a Torque problem or >> somewhere related to it. >> >> Yes, if I do handle the transaction myself I don't get into >> this issue, but still the connection pool should handle the >> transactions/connections gracefully if it's starting one on >> your behalf. >> >> I've the autocommit turned on (by default), so it shouldn't >> be problem with that either. >> >> I am still waiting for the right answer where exactly the >> problem lies - >> 1) How do I get ORA-01453 if I am not starting the transaction myself >> 2) Why the connection hangs after the ORA-01453 >> >> Thanks, >> -vivek >> > > Duke CE Privacy Statement > Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed. If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately. Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org