Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0035060 | Openbravo ERP | A. Platform | public | 2017-01-26 14:17 | 2017-03-15 20:18 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q2 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0035060: EntityPersistanceEventObservers are executed twice on commitAndClose |
Description | Whenever commitAndClose is invoked all EntityPersistanceEventObserver for modified objects are executed twice.
The problem is caused because Session.isDirty() check is finally causing them to be invoked, afer that, actual flush executes them again. |
Steps To Reproduce | - Modify any dal object that has an observer
- Execute OBDal.getInstance().commitAndClose() check the observer gets executed twice
More detailed description can be found in the test cases related with this issue. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0032308 | | closed | alostale | error on update if entity persistence observer loaded current object in memory | has duplicate | design defect | 0024287 | | closed | platform | Event Handler runs 2 times when the change is made by another Event Handler | related to | defect | 0035062 | | closed | alostale | junit Weld tests not firing first 'begin transaction' event to DAL EventHandlers | related to | defect | 0035075 | | closed | alostale | PersistanceObserver can fail if other observers for OrderLine are present | blocks | design defect | 0035007 | | closed | alostale | audit trail causes excessive overhead |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-01-26 14:17 | alostale | New Issue | |
2017-01-26 14:17 | alostale | Assigned To | => platform |
2017-01-26 14:17 | alostale | Modules | => Core |
2017-01-26 14:17 | alostale | Triggers an Emergency Pack | => No |
2017-01-26 14:17 | alostale | Relationship added | related to 0032308 |
2017-01-26 14:21 | alostale | Relationship added | related to 0024287 |
2017-01-26 14:22 | alostale | Review Assigned To | => caristu |
2017-01-26 14:22 | alostale | Assigned To | platform => alostale |
2017-01-26 14:22 | alostale | Priority | normal => urgent |
2017-01-26 14:22 | alostale | Status | new => scheduled |
2017-01-26 14:23 | alostale | Relationship added | blocks 0035007 |
2017-01-27 12:17 | alostale | Relationship added | related to 0035062 |
2017-01-27 12:58 | hgbot | Checkin | |
2017-01-27 12:58 | hgbot | Note Added: 0093884 | |
2017-01-27 12:58 | hgbot | Checkin | |
2017-01-27 12:58 | hgbot | Note Added: 0093886 | |
2017-01-27 12:58 | hgbot | Status | scheduled => resolved |
2017-01-27 12:58 | hgbot | Resolution | open => fixed |
2017-01-27 12:58 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/846c5e30a86445c03ae75871caeffcebab990b9d [^] |
2017-01-27 12:58 | hgbot | Checkin | |
2017-01-27 12:58 | hgbot | Note Added: 0093887 | |
2017-01-27 14:39 | hgbot | Checkin | |
2017-01-27 14:39 | hgbot | Note Added: 0093897 | |
2017-01-30 09:01 | alostale | Relationship added | related to 0035075 |
2017-01-30 09:33 | caristu | Note Added: 0093916 | |
2017-01-30 09:33 | caristu | Status | resolved => closed |
2017-01-30 09:33 | caristu | Fixed in Version | => 3.0PR17Q2 |
2017-01-30 09:33 | caristu | Note Edited: 0093916 | bug_revision_view_page.php?bugnote_id=0093916#r14391 |
2017-01-30 16:28 | caristu | Relationship deleted | related to 0024287 |
2017-01-30 16:28 | caristu | Relationship added | has duplicate 0024287 |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095125 | |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095127 | |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095128 | |
2017-03-15 20:18 | hudsonbot | Checkin | |
2017-03-15 20:18 | hudsonbot | Note Added: 0095132 | |
Notes |
|
(0093884)
|
hgbot
|
2017-01-27 12:58
|
|
Repository: erp/devel/pi
Changeset: 1c0723461716e1c4a9d9bb8bad33339a93b6355d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 26 14:31:05 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1c0723461716e1c4a9d9bb8bad33339a93b6355d [^]
related to bug 35060: Observers are executed twice on commitAndClose
added test cases
---
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/DatasourceEventObserver.java
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/OrderLineTestObserver.java
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src-test/src/org/openbravo/test/dal/DalPerformanceCriteriaTest.java
A modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/ObserverBaseTest.java
A modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/PersistanceObserver.java
---
|
|
|
(0093886)
|
hgbot
|
2017-01-27 12:58
|
|
Repository: erp/devel/pi
Changeset: 846c5e30a86445c03ae75871caeffcebab990b9d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 27 11:02:07 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/846c5e30a86445c03ae75871caeffcebab990b9d [^]
fixed bug 35060: Observers are executed twice on commitAndClose
DAL observes got executed twice on commitAndClose because session.isDirty check
was causing them to be called.
Now, session dirtiness shouldn't be checked using directly session.isDirty method
but through the new OBDal.isSessionDirty, which allows OBInterceptor to know if
session is being checked so that it can prevent observes execution.
---
M src/org/openbravo/dal/core/OBInterceptor.java
M src/org/openbravo/dal/core/SessionHandler.java
M src/org/openbravo/dal/service/OBDal.java
---
|
|
|
(0093887)
|
hgbot
|
2017-01-27 12:58
|
|
Repository: erp/devel/pi
Changeset: ea09f236e45875780fc0de7f7a572081a24aeef3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 27 11:03:47 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ea09f236e45875780fc0de7f7a572081a24aeef3 [^]
related to bug 35060: updated tests cases to use new API
---
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/PersistanceObserver.java
---
|
|
|
(0093897)
|
hgbot
|
2017-01-27 14:39
|
|
Repository: erp/devel/pi
Changeset: 60800d545b59b46c6f55c1a876be6e597fcaca18
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 27 14:38:19 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/60800d545b59b46c6f55c1a876be6e597fcaca18 [^]
related to bug 35060: prevent double execution in DefaultJsonDataService
---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
|
|
|
|
Code reviewed + testing OK: using new OBDal.isSessionDirty method observers are executed once.
reviewed in pi@2d51591f5a05.
|
|
|
|
|
|
|
|
|
|
|
|
|
|