Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031920Retail ModulesWeb POSpublic2016-01-16 18:032016-02-03 15:07
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
migueldejuana
No
0031920: The value returned by MobileServerController.getThisServerDefinition can be cached
MobileServerController.getThisServerDefinition returns the MobileServerDefinition of the current server, or null if it is not defined.

The MobileServerDefinition returned is going to be always the same, so it is better to cache to improve the performance.
It is clear just by looking at the code [1] that the value returned is always the same (it is going to depend on the mobile.server.key property defined in Openbravo.properties, its value is not going to change at least until tomcat is restarted).

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/47545a15e44c/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l163 [^]
No tags attached.
Issue History
2016-01-16 18:03AugustoMauchNew Issue
2016-01-16 18:03AugustoMauchAssigned To => Retail
2016-01-16 18:03AugustoMauchTriggers an Emergency Pack => No
2016-01-16 18:10AugustoMauchReview Assigned To => mtaal
2016-01-16 18:13hgbotCheckin
2016-01-16 18:13hgbotNote Added: 0083360
2016-01-16 18:13hgbotStatusnew => resolved
2016-01-16 18:13hgbotResolutionopen => fixed
2016-01-16 18:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b6380a27f941d566695248743a83d34d124d6c3b [^]
2016-01-16 18:14hgbotCheckin
2016-01-16 18:14hgbotNote Added: 0083361
2016-01-18 10:45marvintmAssigned ToRetail => AugustoMauch
2016-01-18 16:05hgbotCheckin
2016-01-18 16:05hgbotNote Added: 0083380
2016-01-18 16:06mtaalReview Assigned Tomtaal => AugustoMauch
2016-01-21 06:36hgbotCheckin
2016-01-21 06:36hgbotNote Added: 0083479
2016-02-01 14:21mtaalReview Assigned ToAugustoMauch => migueldejuana
2016-02-03 15:07migueldejuanaNote Added: 0083896
2016-02-03 15:07migueldejuanaStatusresolved => closed

Notes
(0083360)
hgbot   
2016-01-16 18:13   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b6380a27f941d566695248743a83d34d124d6c3b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Sat Jan 16 18:10:31 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b6380a27f941d566695248743a83d34d124d6c3b [^]

Fixes issue 31920: Cache current server definition in MobileServerController

The MobileServerController.getThisServerDefinition method seems to be invoked quite often and the value that returns is always the same, it is better to cache the returned value.

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0083361)
hgbot   
2016-01-16 18:14   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: dd0b6d3bb826c477fecae0cad85b899efb219a1e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Sat Jan 16 18:11:56 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/dd0b6d3bb826c477fecae0cad85b899efb219a1e [^]

Related with issue 31920: Updates year in copyright

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0083380)
hgbot   
2016-01-18 16:05   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0e660a087cb3d245d11eb7b067b0f45f404257ac
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jan 18 16:05:30 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0e660a087cb3d245d11eb7b067b0f45f404257ac [^]

Related to issue 31920: The value returned by MobileServerController.getThisServerDefinition can be cached
Refresh the cached server definition and initialize the collections

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0083479)
hgbot   
2016-01-21 06:36   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3234152079598da93d07e78d7cda512fc4fabc33
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jan 21 06:36:34 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3234152079598da93d07e78d7cda512fc4fabc33 [^]

Related to issue 31920: The value returned by MobileServerController.getThisServerDefinition can be cached
A background process should use the uncached version of the server definition

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0083896)
migueldejuana   
2016-02-03 15:07   
Tested and reviewed