(0092089)
|
hgbot
|
2016-12-05 12:47
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: ebb293ead59bc6ecc582b44eac54e0b8ae2711a2
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Dec 05 12:47:30 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ebb293ead59bc6ecc582b44eac54e0b8ae2711a2 [^]
Fixed issue 34516. Do not rely on synchronized flag to resolve potential race condition.
- When using shared payment methods, the cashups need to be associated forming a hierarchy. Before the change, to resolve potential race condition problems when master and slave terminals where logging in the system in parallel, the synchronized keyword was used. This ensured that cashups were generated sequentially, which ensured in turn that either master or slave cashups were found by the associating queries, and the hierarchy was always formed.
However, this doesn't work in an environment with clustering. To resolve this problem, the synchronized keyword has been removed, which means that now if terminals log at the same time, it is possible that cashups may be created and the hierarchy may still not be formed. However, this is not a problem, as the online requests which are done when the user accesses the Cashup window either in slave or in master terminals have also been modified, so that the association is formed at this point if it doesn't exist. This means that the hierarchy will always be formed when accessing the cashup window, even if it was not originally formed when logging in the system.
---
M src/org/openbravo/retail/posterminal/ProcessCashCloseMaster.java
M src/org/openbravo/retail/posterminal/ProcessCashCloseSlave.java
M src/org/openbravo/retail/posterminal/UpdateCashup.java
---
|
|