Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045562Retail ModulesWeb POSpublic2020-12-14 09:302021-01-25 11:47
salvador_campanella 
Retail 
highmajoralways
newopen 
5
 
 
No
0045562: Messages, translations and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed in HA
Messages, translations, and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed in High Availability instances

As part of the initial loading steps of WebPOS, there are some pre-render actions that include loading all the messages, translations, and lists. This information is not cached so the same results are loaded from the database many times.

When having two nodes for the Application Server, when we login back office on node-A, and update the translation, only node-A Labels Map cleared. The translations only affect the tills linked to node-A, the tills linked on Node-B will not be affected.
- Add a breakpoint in org.openbravo.mobile.core.login.LabelsComponent in functions getLabels() in line 'for (Object[] qryTrlObject : qryLists.list()) {'
- Load the WebPOS login screen (the breakpoint is hit)
- Refresh the page (the breakpoint is hit again)
- Load the WebPOS login screen from another computer (the breakpoint is hit again)
No tags attached.
related to defect 0042356 closed ranjith_qualiantech_com Messages, translations and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed 
Issue History
2020-12-14 09:30salvador_campanellaNew Issue
2020-12-14 09:30salvador_campanellaAssigned To => Retail
2020-12-14 09:30salvador_campanellaResolution time => 1609714800
2020-12-14 09:30salvador_campanellaTriggers an Emergency Pack => No
2020-12-14 09:30salvador_campanellaRelationship addedrelated to 0042356
2020-12-31 07:47marvintmNote Added: 0125200
2020-12-31 07:47marvintmTypedefect => design defect
2021-01-25 11:47marvintmResolution time1609714800 =>

Notes
(0125200)
marvintm   
2020-12-31 07:47   
We are changing this issue to design defect.

Translations are considered "sources" in OB, and that is why they are cached. It is true that as part of the caching mechanism we also introduced an event handler to reset the cache whenever possible, but this didn't change the fact that the correct way to apply a translation in a production environment in Openbravo is by installing a translation module, and this has always required a system restart.

Changing this rule (so essentially removing the cache as there is no way to properly reset it in a HA environment), would be worse decisions overall than removing this limitation because of the performance penalty they would introduce, so we have decided not to change it for now.