Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034496Openbravo ERP09. Financial managementpublic2016-11-14 16:002018-02-22 18:18
caristu 
collazoandy4 
highmajoralways
closedfixed 
5
 
3.0PR18Q2 
dmiguelez
Core
No
0034496: CostingAlgorithmAdjustmentImp class is not thread safe
The application scoped class CostingAlgorithmAdjustmentImp[1] is not stateless[2]. This means that it is thread unsafe and therefore it does not guarantee its correct execution (even working in a single node) when being executed by different threads in parallel.


[1] https://code.openbravo.com/erp/devel/pi/file/3b0fb57e7fed/src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java [^]
[2] http://docs.oracle.com/javaee/6/tutorial/doc/gipjg.html#gipim [^]
In description
multiThread
blocks design defect 0034664 acknowledged Triage Platform Base multi thread unsafeties 
Issue History
2016-11-14 16:00caristuNew Issue
2016-11-14 16:00caristuAssigned To => Triage Finance
2016-11-14 16:00caristuModules => Core
2016-11-14 16:00caristuTriggers an Emergency Pack => No
2016-11-14 16:01caristuRelationship addedrelated to 0034490
2016-11-14 16:03caristuDescription Updatedbug_revision_view_page.php?rev_id=13691#r13691
2016-11-14 16:04caristuDescription Updatedbug_revision_view_page.php?rev_id=13692#r13692
2016-11-15 11:14caristuSummary[clustering] CostingAlgorithmAdjustmentImp class is not thread safe => CostingAlgorithmAdjustmentImp class is not thread safe
2016-11-16 16:38alostaleTag Attached: multiThread
2016-11-16 16:38alostaleRelationship deletedrelated to 0034490
2016-12-01 11:57alostaleRelationship addedblocks 0034664
2016-12-01 11:57alostaleSeverityminor => major
2017-12-26 11:29vmromanosStatusnew => scheduled
2017-12-26 11:29vmromanosAssigned ToTriage Finance => collazoandy4
2018-01-25 18:24hgbotCheckin
2018-01-25 18:24hgbotNote Added: 0101978
2018-01-25 18:24hgbotStatusscheduled => resolved
2018-01-25 18:24hgbotResolutionopen => fixed
2018-01-25 18:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e0f8af32f887279ada1736685cc7048efb71f827 [^]
2018-01-25 18:26dmiguelezNote Added: 0101979
2018-01-25 18:27dmiguelezReview Assigned To => dmiguelez
2018-01-25 18:27dmiguelezNote Added: 0101980
2018-01-25 18:27dmiguelezStatusresolved => closed
2018-01-25 18:27dmiguelezFixed in Version => 3.0PR18Q2
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102688

Notes
(0101978)
hgbot   
2018-01-25 18:24   
Repository: erp/devel/pi
Changeset: e0f8af32f887279ada1736685cc7048efb71f827
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 25 11:50:41 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e0f8af32f887279ada1736685cc7048efb71f827 [^]

Fixes Issue 34496. This class was original developed as a singleton.
However, as it evolved, this design was changed and now it behaves
as an object.

Now the information of the object should be created and destroyed
when a new instance of this object is created.

This is done in CostAdjustmentProcess using injection.

That is why the definition of ApplicationScoped does not make
sense any more, it must be Dependant.

---
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0101979)
dmiguelez   
2018-01-25 18:26   
Test plan:

Launch TestCosting suite to check that the Costing functionality is working as expected.
(0101980)
dmiguelez   
2018-01-25 18:27   
Code Review + Testing Ok
(0102688)
hudsonbot   
2018-02-22 18: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/980a6ad5bbf5 [^]
Maturity status: Test