Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336932 - [DB] Derby connection is not closed
Summary: [DB] Derby connection is not closed
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.db (show other bugs)
Version: 4.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 08:09 EST by Egidijus Vaisnora CLA
Modified: 2011-06-23 03:40 EDT (History)
2 users (show)

See Also:
stepper: review+
stepper: review+


Attachments
Patch v1 (743 bytes, patch)
2011-02-14 04:38 EST, Egidijus Vaisnora CLA
no flags Details | Diff
Patch (incremental) (650 bytes, patch)
2011-02-28 05:51 EST, Caspar D. CLA
no flags Details | Diff
Patch v3 - ready to be committed (1.16 KB, patch)
2011-03-01 02:37 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Egidijus Vaisnora CLA 2011-02-11 08:09:59 EST
In Derby, each connection before *close* needs to call *committed* or *rollback* always in order to complete transaction, if autocommit is set to false. Now I got exception "Cannot close a connection while a transaction is still active." on running CDO server for the second time, when DB is already created
Even, if transaction executes read statement it must be explicitly *committed* or *rollback*.
http://db.apache.org/derby/docs/10.4/devguide/cdevconcepts29416.html
Comment 1 Egidijus Vaisnora CLA 2011-02-14 04:38:07 EST
Created attachment 188879 [details]
Patch v1

We can always initiate rollback, whenever connections is aranged for closing
Comment 2 Eike Stepper CLA 2011-02-22 06:35:06 EST
Stefan may want to have a look, as well.

Since it'd be easy enough to remove you may commit it now ;-)
Comment 3 Egidijus Vaisnora CLA 2011-02-22 16:07:19 EST
committed to trunk, revision 7178
Comment 4 Caspar D. CLA 2011-02-28 05:48:31 EST
Patch has introduced the opposite problem for connections with
autocommit = true. I.e. they can't be rolled back, but with the
current patch, rollback gets called on them anyway.
Comment 5 Caspar D. CLA 2011-02-28 05:51:09 EST
Created attachment 189925 [details]
Patch (incremental)
Comment 6 Eike Stepper CLA 2011-03-01 02:37:14 EST
Created attachment 190024 [details]
Patch v3 - ready to be committed
Comment 7 Caspar D. CLA 2011-03-01 03:03:34 EST
Committed to trunk, revision 7312.
Comment 8 Eike Stepper CLA 2011-06-23 03:40:09 EDT
Available in R20110608-1407