From derby-user-return-14029-apmail-db-derby-user-archive=db.apache.org@db.apache.org Tue Nov 22 11:15:59 2011 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 E25B49CB0 for ; Tue, 22 Nov 2011 11:15:59 +0000 (UTC) Received: (qmail 41787 invoked by uid 500); 22 Nov 2011 11:15:59 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 41763 invoked by uid 500); 22 Nov 2011 11:15:59 -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 41756 invoked by uid 99); 22 Nov 2011 11:15:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 11:15:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.32.180.12] (HELO VA3EHSOBE002.bigfish.com) (216.32.180.12) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 11:15:51 +0000 Received: from mail170-va3-R.bigfish.com (10.7.14.244) by VA3EHSOBE002.bigfish.com (10.7.40.22) with Microsoft SMTP Server id 14.1.225.22; Tue, 22 Nov 2011 11:14:50 +0000 Received: from mail170-va3 (localhost [127.0.0.1]) by mail170-va3-R.bigfish.com (Postfix) with ESMTP id D7E22520398 for ; Tue, 22 Nov 2011 11:17:14 +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);IPV:NLI;H:emea-tc2-edge02.sungard.com;RD:none;EFVD:NLI X-FB-SS: 0,0, Received: from mail170-va3 (localhost.localdomain [127.0.0.1]) by mail170-va3 (MessageSwitch) id 1321960634424669_19631; Tue, 22 Nov 2011 11:17:14 +0000 (UTC) Received: from VA3EHSMHS023.bigfish.com (unknown [10.7.14.248]) by mail170-va3.bigfish.com (Postfix) with ESMTP id 61844300048 for ; Tue, 22 Nov 2011 11:17:14 +0000 (UTC) Received: from emea-tc2-edge02.sungard.com (213.86.77.19) by VA3EHSMHS023.bigfish.com (10.7.99.33) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 22 Nov 2011 11:14:44 +0000 Received: from EMEA-TC2-CAS01.internal.sungard.corp (10.254.236.2) by emea-tc2-edge02.sungard.com (213.86.77.6) with Microsoft SMTP Server (TLS) id 14.1.339.1; Tue, 22 Nov 2011 11:13:28 +0000 Received: from EMEA-TC2-MB04.internal.sungard.corp ([169.254.4.139]) by emea-tc2-cas01.internal.sungard.corp ([10.254.236.2]) with mapi id 14.01.0339.001; Tue, 22 Nov 2011 11:13:37 +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: AcypBx3g2gK02SsDTZSsGVkM758dVAAAEBZQ Date: Tue, 22 Nov 2011 11:13:36 +0000 Message-ID: References: <0773A3CE9DAC7B42B8F564C52805678D03E366F0@EVS01.intern.interpay.nl> In-Reply-To: <0773A3CE9DAC7B42B8F564C52805678D03E366F0@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_A49594410EE1194E80BC8C369B07A06C0A0394AFemeatc2mb04inte_" MIME-Version: 1.0 X-CFilter-Loop: VT_Reflected X-OriginatorOrg: sungard.com X-Virus-Checked: Checked by ClamAV on apache.org --_000_A49594410EE1194E80BC8C369B07A06C0A0394AFemeatc2mb04inte_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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_A49594410EE1194E80BC8C369B07A06C0A0394AFemeatc2mb04inte_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

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.Kem= pff@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 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

 

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_A49594410EE1194E80BC8C369B07A06C0A0394AFemeatc2mb04inte_--