Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 149340 - TransactionalEditingDomainImpl.deactivate() does not release lock exceptions occur
Summary: TransactionalEditingDomainImpl.deactivate() does not release lock exceptions ...
Status: VERIFIED FIXED
Alias: None
Product: EMF Services
Classification: Modeling
Component: Transaction (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 major
Target Milestone: ---   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-30 16:41 EDT by Christian Damus CLA
Modified: 2017-02-24 15:10 EST (History)
2 users (show)

See Also:


Attachments
Patch to add the try/finally structure (1.35 KB, patch)
2006-06-30 16:44 EDT, Christian Damus CLA
wayne.beaton: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2006-06-30 16:41:54 EDT
The post-commit phase of deactivation can throw run-time exceptions.  Although these are generally caused by programming errors and are unrecoverable, it is a fact of life that they will occur and be logged by the Eclipse platform.

When they do occur in post-commit, the TransactionalEditingDomainImpl.deactivate() method does not release the transaction's lock because this is not protected by a finally clause.  This will cause the lock to "dangle", owned forever by the last thread that had a transaction, and no other thread will ever be able to start a transaction for the duration of the Eclipse session.
Comment 1 Christian Damus CLA 2006-06-30 16:44:41 EDT
Created attachment 45627 [details]
Patch to add the try/finally structure

Attached a patch that resolves the problem by putting a try block around the call to postCommit() and a finally around the lock release.
Comment 2 Christian Damus CLA 2006-07-14 13:39:18 EDT
Fix is committed to the R1_0_maintenance branch.
Comment 3 Christian Damus CLA 2006-07-14 13:39:53 EDT
Forgot to resolve the bug on that last comment ...
Comment 4 Nick Boldt CLA 2008-01-28 16:35:14 EST
Move to verified as per bug 206558.