Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A90E5958D for ; Tue, 22 Nov 2011 12:02:20 +0000 (UTC) Received: (qmail 29538 invoked by uid 500); 22 Nov 2011 12:02:20 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 29513 invoked by uid 500); 22 Nov 2011 12:02:20 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 29506 invoked by uid 99); 22 Nov 2011 12:02:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 12:02:20 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_NEUTRAL,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [65.55.88.10] (HELO TX2EHSOBE004.bigfish.com) (65.55.88.10) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 12:02:14 +0000 Received: from mail76-tx2-R.bigfish.com (10.9.14.246) by TX2EHSOBE004.bigfish.com (10.9.40.24) with Microsoft SMTP Server id 14.1.225.22; Tue, 22 Nov 2011 12:01:12 +0000 Received: from mail76-tx2 (localhost [127.0.0.1]) by mail76-tx2-R.bigfish.com (Postfix) with ESMTP id 09E89320081 for ; Tue, 22 Nov 2011 12:01:41 +0000 (UTC) X-SpamScore: 0 X-BigFish: VPS0(zzc89bhc85dhzz1202hzz8275bh8275dhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:213.86.77.19;KIP:(null);UIP:(null);IPVD:NLI;H:emea-tc2-edge02.sungard.com;RD:none;EFVD:NLI Received: from mail76-tx2 (localhost.localdomain [127.0.0.1]) by mail76-tx2 (MessageSwitch) id 1321963300440213_8439; Tue, 22 Nov 2011 12:01:40 +0000 (UTC) Received: from TX2EHSMHS038.bigfish.com (unknown [10.9.14.245]) by mail76-tx2.bigfish.com (Postfix) with ESMTP id 655DF3C0045 for ; Tue, 22 Nov 2011 12:01:40 +0000 (UTC) Received: from emea-tc2-edge02.sungard.com (213.86.77.19) by TX2EHSMHS038.bigfish.com (10.9.99.138) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 22 Nov 2011 12:01:10 +0000 Received: from EMEA-TC2-CAS05.internal.sungard.corp (10.254.236.6) by emea-tc2-edge02.sungard.com (213.86.77.6) with Microsoft SMTP Server (TLS) id 14.1.339.1; Tue, 22 Nov 2011 12:00:51 +0000 Received: from EMEA-TC2-MB04.internal.sungard.corp ([169.254.4.139]) by emea-tc2-cas05.internal.sungard.corp ([10.254.236.6]) with mapi id 14.01.0339.001; Tue, 22 Nov 2011 12:01:00 +0000 From: To: Subject: AW: Does derby ned allways a rollback or commt? Thread-Topic: Does derby ned allways a rollback or commt? Thread-Index: AcypBx3g2gK02SsDTZSsGVkM758dVAAAEBZQAAElzRAAAJPdsA== Date: Tue, 22 Nov 2011 12:01:00 +0000 Message-ID: References: <0773A3CE9DAC7B42B8F564C52805678D03E366F0@EVS01.intern.interpay.nl> <0773A3CE9DAC7B42B8F564C52805678D03E36700@EVS01.intern.interpay.nl> In-Reply-To: <0773A3CE9DAC7B42B8F564C52805678D03E36700@EVS01.intern.interpay.nl> Accept-Language: en-US, en-GB Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.236.238] Content-Type: multipart/alternative; boundary="_000_A49594410EE1194E80BC8C369B07A06C0A0394FAemeatc2mb04inte_" MIME-Version: 1.0 X-CFilter-Loop: VT_Reflected X-OriginatorOrg: sungard.com --_000_A49594410EE1194E80BC8C369B07A06C0A0394FAemeatc2mb04inte_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'd say commit. Commit is the regular operation when all works as expected. Florin Von: Malte.Kempff@de.equens.com [mailto:Malte.Kempff@de.equens.com] Gesendet: Dienstag, 22. November 2011 12:45 An: derby-user@db.apache.org Betreff: AW: Does derby ned allways a rollback or commt? So what would be the best practice using a rollback or a commit when just r= eading a database? Malte ________________________________ Von: Florin.Herinean@sungard.com [mailt= o:Florin.Herinean@sungard.com] Gesendet: Dienstag, 22. November 2011 12:14 An: derby-user@db.apache.org Betreff: AW: Does derby ned allways a rollback or commt? That is not derby specific. In any db selects are part of transactions too.= So either you enable autocommit or you explicitly commit your transaction(= s) before releasing the connection. Commit will release the locks you acqui= red on the db (read locks if you haven't modified anything). Cheers, Florin Von: Malte.Kempff@de.equens.com [mailto:= Malte.Kempff@de.equens.com] Gesendet: Dienstag, 22. November 2011 12:09 An: derby-user@db.apache.org Betreff: Does derby ned allways a rollback or commt? Hi, I have an application using embedded derby (10.8.1.2). In the program I use= a little routine that ends with rollback, commit or nothing at all, by usi= ng a parameter. In a certain mode I just do a select, so As far I concern I don't need to d= o neither rollback nor commit, since it is just a select. But I get then always an Exception: Eine Verbindung kann nicht beendet werden, solange noch eine Transaktion ak= tiv ist. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(U= nknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Sourc= e) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Sourc= e) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Sou= rce) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown= Source) at org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInPr= ogress(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) That obviously is the code 25001 Even though I initialize all my prepared statements that also are inserts a= nd updates, in this mode only a select statement is used. How come I get such a Exception. It seems that I have to commit or rollback= always I quit a derby program even though no change has occurred on partic= ular database Or is there something I should care about? Equens SE Malte Kempff Core Applications/ Change Bulk Payments Tel: +49(0)69/58 99 93 - 60417 Fax: +49(0)69/58 99 93 - 60290 mail to:Malte.Kempff@de.equens.com Equens SE Mainzer Landstra=DFe 201 60326 Frankfurt Germany Tel: +49(0)69-589993-09 Fax: +49(0)69-589993-60300 Amtsgericht Frankfurt HRB 84 429 http://www.equens.com info@de.equens.com Vorstand: Michael Steinbach (Vorstandsvorsitzender) Alessandro Baroni Dr. G=F6tz M=F6ller Jan Sonneveld Aufsichtsratsvorsitzender: Erik Dralans Sitz: 3526 LB Utrecht, Niederlande, Eendrachtlaan 315, Handelskammer 3022.0= 519 --_000_A49594410EE1194E80BC8C369B07A06C0A0394FAemeatc2mb04inte_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I’d = say commit. Commit is the regular operation when all works as expected.

 = ;

Florin

 = ;

Von: Malte.Kem= pff@de.equens.com [mailto:Malte.Kempff@de.equens.com]
Gesendet: Dienstag, 22. November 2011 12:45
An: derby-user@db.apache.org
Betreff: AW: Does derby ned allways a rollback or commt?<= /span>

 

So what would be the = best practice using a rollback or a commit when just reading a database?

 

Malte


Von: Florin.Herinean@sungard.com<= /a> [mailto:Florin.Herinean@= sungard.com]
Gesendet: Dienstag, 22. November 2011 12:14
An: derby-user@db.apache= .org
Betreff: AW: Does derby ned allways a rollback or commt?

 

That is no= t derby specific. In any db selects are part of transactions too. So either= you enable autocommit or you explicitly commit your transaction(s) before releasing the connection. Commit will release the locks you acquire= d on the db (read locks if you haven’t modified anything).

 

Cheers,

 

Florin

 

Von: Malte.Kempff@de.equens.com [mailto:Malte.Kempff@de.equ= ens.com]
Gesendet: Dienstag, 22. November 2011 12:09
An: derby-user@db.apache= .org
Betreff: Does derby ned allways a rollback or commt?

 

Hi,

I have an application usin= g embedded derby (10.8.1.2). In the program I use a little routine that end= s with rollback, commit or nothing at all, by using a parameter.

In a certain mode I just d= o a select, so As far I concern I don't need to do neither rollback nor com= mit, since it is just a select.

But I get then always an E= xception:

 

Eine Verbindung ka= nn nicht beendet werden, solange noch eine Transaktion aktiv ist.

   =    at org.apache.derby.impl.jdbc.SQLExceptionFactory= 40.getSQLException(Unknown Source)

&nb= sp;     at org.apache.derby.impl.jdbc.Util.newEmbedSQLE= xception(Unknown Source)

&nb= sp;     at org.apache.derby.impl.jdbc.Util.newEmbedSQLE= xception(Unknown Source)

&nb= sp;     at org.apache.derby.impl.jdbc.Util.generateCsSQ= LException(Unknown Source)

&nb= sp;     at org.apache.derby.impl.jdbc.EmbedConnection.n= ewSQLException(Unknown Source)

&nb= sp;     at org.apache.derby.impl.jdbc.EmbedConnection.c= heckForTransactionInProgress(Unknown Source)

      at= org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source)

 

That obviously is the code 25001

 

Even though I initialize a= ll my prepared statements that also are inserts and updates, in this mode o= nly a select statement is used.

How come I get such a Exce= ption. It seems that I have to commit or rollback always I quit a derby pro= gram even though no change has occurred on particular database<= /o:p>

 

Or is there something I sh= ould care about?

Equens SE

Malte Kempff

Core = Applications/ Change Bulk Payments

Tel:&= nbsp;     +49(0)69/58 99 93 - 60417

Fax:&= nbsp;    +49(0)69/58 99 93 - 60290

mail = to:Malte.Kempff@de.equens.com 

 

Equens SE
Mainzer Landstra=DFe 201
60326 Frankfurt
Germany
Tel: +49(0)69-589993-09
Fax: +49(0)69-589993-60300
Amtsgericht Frankfurt HRB 84 429
http://www.equens.com 

info@de.equens.com    


Vorstand: Michael Steinbach (Vorstan= dsvorsitzender)
Alessandro Baroni
Dr. G=F6tz M=F6ller
Jan Sonneveld
Aufsichtsratsvorsitzender: Erik Dralans
Sitz: 3526 LB Utrecht, Niederlande, Eendrachtlaan 315, Handelskammer 3022.0= 519

 

--_000_A49594410EE1194E80BC8C369B07A06C0A0394FAemeatc2mb04inte_--