Bug 103416 - TransactionContextImpl should call fireCommitEvent() within the try block, not the finally block
Summary: TransactionContextImpl should call fireCommitEvent() within the try block, no...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: ccm-bugs-list
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: 103600
TreeView+ depends on / blocked
 
Reported: 2003-08-29 21:57 UTC by Scott Seago
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-09 15:41:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Scott Seago 2003-08-29 21:57:44 UTC
Description of problem:
TransactionContextImpl should call fireCommitEvent() within the try block, not
the finally block -- as it stands in the 5.2 codebase, if
fireBeforeCommitEvent() throws an exception, that exception is lost since
fireCommitEvent() throws an assertion exception due to the transaction not
cleaning up properly.

changelist 35501 fixes this on the london 5.2 codebase. It's not relevant for
6.0, as this code has been substantially refactored and the problem no longer
exists there.

Version-Release number of selected component (if applicable):
5.2

How reproducible:
Only reproduced if fireCommitEvent throws an exception.

Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Richard Li 2003-08-30 00:34:00 UTC
The semantics around disconnected data objects could be violated by this change
in certain cases, so we're going to need to think about this change a bit, and
also see how it works out on the London tree.

Comment 2 Scott Seago 2003-08-30 01:35:17 UTC
Yes, it wasn't clear to me exactly where the disconnectDataObject call should go
after moving the fireCommitEvent() call. The intention of the change is to
prevent fireCommitEvent from being called after an exception is thrown (which is
what the troika code already does). But this code has been refactored so much
for troika that I couldn't just grab it as-is for 5.2

Comment 3 Archit Shah 2003-12-24 18:05:29 UTC
Change 35501 integrated to 5.2.x at 35689.


Note You need to log in before you can comment on or make changes to this bug.