Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0045764 | Openbravo ERP | A. Platform | public | 2021-01-20 13:47 | 2021-01-21 08:30 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | PR21Q2 | |
Merge Request Status | approved |
Review Assigned To | |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0045764: commitAndClose silently rolls back if hibernate trx is marked for roll back |
Description | When the hibernate transaction is marked for rollback and OBDal.commitAndClose is invoked, the database transaction is silently rolled back instead of committed.
Hibernate transaction is marked for rollback in case flush throws an exception. |
Steps To Reproduce | 1. Write an event observer that throws an exception. Here an example [1]
2. Do a DAL modification and a flush to trigger that exception. Here an example [2]
3. Catch the exception, do a valid modification reverting previous one and do commitAndClose
-> The code will apparently work but in DB it will be rolled back (ROLLBACK statement can also be seen in postrgresql log)
[1] https://gitlab.com/alo-issues/demo/org.alo.issue.importentry/-/blob/master/src/org/alo/issue/importentry/FailUpdateProductHandler.java [^]
[2] https://gitlab.com/alo-issues/demo/org.alo.issue.importentry/-/snippets/2063676 [^] |
Proposed Solution | Keep current behavior (do not throw any exception) but log an error to make it easier to understand the possible problem. |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2021-01-20 13:47 | alostale | New Issue | |
2021-01-20 13:47 | alostale | Assigned To | => platform |
2021-01-20 13:47 | alostale | OBNetwork customer | => No |
2021-01-20 13:47 | alostale | Modules | => Core |
2021-01-20 13:47 | alostale | Triggers an Emergency Pack | => No |
2021-01-20 13:47 | alostale | Assigned To | platform => alostale |
2021-01-20 13:48 | alostale | Summary | commitAndClose silently rolled back if hibernate trx is marked to roll back => commitAndClose silently rolled back if hibernate trx is marked for roll back |
2021-01-20 13:48 | alostale | Summary | commitAndClose silently rolled back if hibernate trx is marked for roll back => commitAndClose silently rolls back if hibernate trx is marked for roll back |
2021-01-20 14:00 | hgbot | Merge Request Status | => open |
2021-01-20 14:00 | hgbot | Note Added: 0125696 | |
2021-01-21 08:29 | hgbot | Merge Request Status | open => approved |
2021-01-21 08:30 | hgbot | Resolution | open => fixed |
2021-01-21 08:30 | hgbot | Status | new => closed |
2021-01-21 08:30 | hgbot | Fixed in Version | => PR21Q2 |
2021-01-21 08:30 | hgbot | Note Added: 0125703 | |
2021-01-21 08:30 | hgbot | Note Added: 0125704 | |