Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033185Retail ModulesWeb POSpublic2016-06-07 19:362016-06-20 10:31
shuehner 
mtaal 
normalminorhave not tried
closedfixed 
5
 
 
AugustoMauch
No
0033185: Missing OBDal.getInstance().getProxy usage in new mobile.core.servercontroller code
Some examples where Proxy should be used to not do extra db roundtrip for nothing

1.) MobileServerController.java
      importEntry.setOrganization(OBDal.getInstance().get(Organization.class, "0"));
      importEntry.setRole(OBDal.getInstance().get(Role.class,
          OBContext.getOBContext().getRole().getId()));
2* times in both sendMessage functions

2.) MobileServerRequestExecutor
      servers.setNamedParameter("org",
          OBDal.getInstance().get(Organization.class, parameters.getString("organization")));

-
use getProxy( instead of just .get( to avoid initializing the object with a db read which is not required here.
No tags attached.
Issue History
2016-06-07 19:36shuehnerNew Issue
2016-06-07 19:36shuehnerAssigned To => Retail
2016-06-07 19:36shuehnerTriggers an Emergency Pack => No
2016-06-07 20:29shuehnerSummaryMissing Proxy usage in new mobile.core.servercontroller code => Missing OBDal.getInstance().getProxy usage in new mobile.core.servercontroller code
2016-06-10 15:37mtaalAssigned ToRetail => mtaal
2016-06-10 15:38mtaalReview Assigned To => AugustoMauch
2016-06-10 15:43hgbotCheckin
2016-06-10 15:43hgbotNote Added: 0087171
2016-06-10 15:43hgbotStatusnew => resolved
2016-06-10 15:43hgbotResolutionopen => fixed
2016-06-10 15:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f25be1d69dba8fa3d839af4bd2e4d088ad613e68 [^]
2016-06-20 10:31AugustoMauchNote Added: 0087652
2016-06-20 10:31AugustoMauchStatusresolved => closed

Notes
(0087171)
hgbot   
2016-06-10 15:43   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: f25be1d69dba8fa3d839af4bd2e4d088ad613e68
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Jun 10 15:38:26 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f25be1d69dba8fa3d839af4bd2e4d088ad613e68 [^]

Fixes issue 33185: Missing OBDal.getInstance().getProxy usage in new mobile.core.servercontroller code
Use getProxy were relevant

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
---
(0087652)
AugustoMauch   
2016-06-20 10:31   
Code review and verified in [1]@f25be1d69dba

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/ [^]