Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314455 - CDOTransaction.commit() should declare a checked exception
Summary: CDOTransaction.commit() should declare a checked exception
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 09:05 EDT by Eike Stepper CLA
Modified: 2010-06-29 09:22 EDT (History)
2 users (show)

See Also:


Attachments
Patch (111.92 KB, patch)
2010-05-26 09:25 EDT, Eike Stepper CLA
no flags Details | Diff
Patch Addon1 (5.58 KB, patch)
2010-05-26 09:34 EDT, 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 Eike Stepper CLA 2010-05-26 09:05:58 EDT
Until now commit() has thrown an unchecked exception in case of local or remote problems. But this sort of problems needs handling by the caller, e.g. a rollback() or repeated commit(). In the future it may make sense to add more specific exception subtypes or properties on the exception. But this API change is needed now because it will most probably break clients. That's intentional so that they are forced to think about their reaction! Sorry for the inconvenience!!
Comment 1 Eike Stepper CLA 2010-05-26 09:25:34 EDT
Created attachment 169984 [details]
Patch

For future reference
Comment 2 Eike Stepper CLA 2010-05-26 09:25:51 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2010-05-26 09:34:11 EDT
Created attachment 169986 [details]
Patch Addon1

This was missing
Comment 4 Kenn Hussey CLA 2010-05-27 13:20:33 EDT
Eike, the deadline for API changes was M6, i.e., two months ago. This change has caused a compile error in at least one downstream component, which is not acceptable at this late stage in the release. :(

Any changes to a Modeling project during the release candidate phase require reviews and approvals according to the rampdown policy at http://wiki.eclipse.org/Modeling_Project_Ramp_Down_Policy/Helios...
Comment 5 Eike Stepper CLA 2010-05-27 13:47:32 EDT
I'm sorry that this change/I caused problems ;-(

I should have read all these documents more carefully. And I was not aware that there are CDO consumers in Helios. Who is it?

As I mentioned before this change was necessary because the unchecked exception can occur at any time and there was no hint from CDO that this can happen. Of course I should have asked before I applied the change. I hope it could be fixed quickly!
Comment 6 Kenn Hussey CLA 2010-05-27 14:02:14 EDT
(In reply to comment #5)
> I'm sorry that this change/I caused problems ;-(

That's why the development process and rampdown policy are in place - to prevent these kinds of problems.

> I should have read all these documents more carefully. And I was not aware that
> there are CDO consumers in Helios. Who is it?

The one I was referring to was MoDisco - see bug 314718.

> As I mentioned before this change was necessary because the unchecked exception
> can occur at any time and there was no hint from CDO that this can happen. Of
> course I should have asked before I applied the change. I hope it could be
> fixed quickly!

I'd beg to differ on whether the change was in fact necessary (especially considering that the importance of this bug is marked as _enhancement_ ). Highly desirable, no doubt, but not necessary.
Comment 7 Eike Stepper CLA 2010-06-29 04:40:32 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/