Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034450Retail ModulesStoreServerpublic2016-11-09 13:432016-11-12 17:19
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
RR17Q1 
AugustoMauch
No
No
0034450: MultiServerJSONSymmetricDSStarter should use thread.start instead of thread.run
See the code [1] here, it uses the run method. The run method blocks and waits for the runnable to finish executing. This was not the intention here. The intention here was to start a separate thread.

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/517c35b6e4c5/src/org/openbravo/retail/storeserver/synchronization/MultiServerJSONSymmetricDSStarter.java#l66 [^]
Put timing log statements (System.err.println(System.currentTimeMillis()) in the doAction method. It will show a 1-2 seconds delay for executing the run method.
Use thread.start instead of thread.run
No tags attached.
Issue History
2016-11-09 13:43mtaalNew Issue
2016-11-09 13:43mtaalAssigned To => mtaal
2016-11-09 13:43mtaalOBNetwork customer => No
2016-11-09 13:43mtaalTriggers an Emergency Pack => No
2016-11-09 13:50hgbotCheckin
2016-11-09 13:50hgbotNote Added: 0091280
2016-11-09 13:50hgbotStatusnew => resolved
2016-11-09 13:50hgbotResolutionopen => fixed
2016-11-09 13:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/24ecfabd909ef0f7e4c4e6cd3e8d38929bf25f2b [^]
2016-11-09 13:51mtaalReview Assigned To => AugustoMauch
2016-11-12 17:19AugustoMauchNote Added: 0091411
2016-11-12 17:19AugustoMauchStatusresolved => closed

Notes
(0091280)
hgbot   
2016-11-09 13:50   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 24ecfabd909ef0f7e4c4e6cd3e8d38929bf25f2b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Nov 09 13:44:07 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/24ecfabd909ef0f7e4c4e6cd3e8d38929bf25f2b [^]

Fixes issue 34450: MultiServerJSONSymmetricDSStarter should use thread.start instead of thread.run
Use Thread.start instead of Thread.run

---
M src/org/openbravo/retail/storeserver/synchronization/MultiServerJSONSymmetricDSStarter.java
---
(0091411)
AugustoMauch   
2016-11-12 17:19   
Code reviewed and verified in [1]@e4fcb8831b41

[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/ [^]