Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035060 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2017-01-26 14:17 | 2017-03-15 20:18 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 846c5e30a864 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
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. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||||||||||||||||
|
Notes | |
(0093884) hgbot (developer) 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 (developer) 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 (developer) 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 (developer) 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 --- |
(0093916) caristu (developer) 2017-01-30 09:33 edited on: 2017-01-30 09:33 |
Code reviewed + testing OK: using new OBDal.isSessionDirty method observers are executed once. reviewed in pi@2d51591f5a05. |
(0095125) hudsonbot (developer) 2017-03-15 20:18 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^] Maturity status: Test |
(0095127) hudsonbot (developer) 2017-03-15 20:18 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^] Maturity status: Test |
(0095128) hudsonbot (developer) 2017-03-15 20:18 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^] Maturity status: Test |
(0095132) hudsonbot (developer) 2017-03-15 20:18 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^] Maturity status: Test |
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 | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |