Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040016Openbravo ERPA. Platformpublic2019-01-23 12:362019-01-25 10:54
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR18Q4.23.0PR18Q4.2 
alostale
Core
No
0040016: Concurrency problems in MyOpenbravoActionHandler
The MyOpenbravoActionHandler execution can fail if it is accessed by several threads at the same time.

This is caused by [1]. As part of the changes done to decrease the time spent to load the widgets after login, the definition of the WidgetProviders is cached[2]. This kind of classes has a private field named widgetClass (a DAL object) which can cause exceptions when accessing to some of its properties in a concurrent way (See error.txt attached).

[1] https://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127 [^]
[2] https://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127#l1.178 [^]
1) Start Tomcat
2) Run the attached MyOpenbravoActionHandlerConcurrencyTest.test that performs several requests to MyOpenbravoActionHandler in parallel
3) The test fails because not all the requests are executed successfully
No tags attached.
blocks defect 0040009 closed caristu Concurrency problems in MyOpenbravoActionHandler 
Issue History
2019-01-23 17:33caristuTypedefect => backport
2019-01-23 17:33caristuTarget Version => 3.0PR18Q4.2
2019-01-24 11:12hgbotCheckin
2019-01-24 11:12hgbotNote Added: 0109151
2019-01-24 11:12hgbotStatusscheduled => resolved
2019-01-24 11:12hgbotResolutionopen => fixed
2019-01-24 11:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q4.2/rev/4ab5cd94e65e62072a0ce56008e6b97dab26adb4 [^]
2019-01-24 11:13caristuNote Added: 0109152
2019-01-24 11:13caristuNote Edited: 0109151bug_revision_view_page.php?bugnote_id=0109151#r18181
2019-01-25 08:15caristuReview Assigned To => alostale
2019-01-25 10:54alostaleNote Added: 0109248
2019-01-25 10:54alostaleStatusresolved => closed
2019-01-25 10:54alostaleFixed in Version => 3.0PR18Q4.2

Notes
(0109151)
hgbot   
2019-01-24 11:12   
(edited on: 2019-01-24 11:13)
Repository: erp/backports/3.0PR18Q4.2
Changeset: 699f8e73b89f7ef58661c5252f327f80ea091bb2
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jan 24 10:54:34 2019 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q4.2/rev/699f8e73b89f7ef58661c5252f327f80ea091bb2 [^] [^]

related to issue 40016: apply new Java formatting

---
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java

(0109152)
caristu   
2019-01-24 11:13   
Repository: erp/backports/3.0PR18Q4.2
Changeset: 4ab5cd94e65e62072a0ce56008e6b97dab26adb4
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jan 24 11:10:47 2019 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q4.2/rev/4ab5cd94e65e62072a0ce56008e6b97dab26adb4 [^] [^]

fixes issue 40016: Concurrency problems in MyOpenbravoActionHandler

As part of the changes done to decrease the time spent to load the widgets after login, the WidgetProviders are cached[1]. This kind of classes had a private field named widgetClass (a DAL object) which could cause errors when accessing to some of its properties in a concurrent way.

To fix this issue we are now keeping in cache the properties of the WidgetClass instead of keeping the reference to the DAL object.

[1] https://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127#l1.178 [^] [^]

---
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
(0109248)
alostale   
2019-01-25 10:54   
reviewed + tested