Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033185
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2016-06-07 19:362016-06-20 10:31
ReportershuehnerView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionf25be1d69dba
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033185: Missing OBDal.getInstance().getProxy usage in new mobile.core.servercontroller code

DescriptionSome 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")));

Steps To Reproduce-
Proposed Solutionuse getProxy( instead of just .get( to avoid initializing the object with a db read which is not required here.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0087171)
hgbot (developer)
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 (manager)
2016-06-20 10:31

Code review and verified in [1]@f25be1d69dba

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

- Issue History
Date Modified Username Field Change
2016-06-07 19:36 shuehner New Issue
2016-06-07 19:36 shuehner Assigned To => Retail
2016-06-07 19:36 shuehner Triggers an Emergency Pack => No
2016-06-07 20:29 shuehner Summary Missing Proxy usage in new mobile.core.servercontroller code => Missing OBDal.getInstance().getProxy usage in new mobile.core.servercontroller code
2016-06-10 15:37 mtaal Assigned To Retail => mtaal
2016-06-10 15:38 mtaal Review Assigned To => AugustoMauch
2016-06-10 15:43 hgbot Checkin
2016-06-10 15:43 hgbot Note Added: 0087171
2016-06-10 15:43 hgbot Status new => resolved
2016-06-10 15:43 hgbot Resolution open => fixed
2016-06-10 15:43 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f25be1d69dba8fa3d839af4bd2e4d088ad613e68 [^]
2016-06-20 10:31 AugustoMauch Note Added: 0087652
2016-06-20 10:31 AugustoMauch Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker