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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028324
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorhave not tried2014-11-30 19:492014-12-01 11:06
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in VersionRR15Q1
StatusclosedFix in branchFixed in SCM revision6ea902cef0df
ProjectionnoneETAnoneTarget VersionRR15Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028324: Source change detection breaks build, non-thread safe handling of js code generation

DescriptionThis issue was found while reviewing while the performance build was broken:
https://ci.openbravo.com/view/retail/job/ret-performance-pgsql/ [^]
https://ci.openbravo.com/view/retail/job/ret-performance-pgsql/ [^]

The source change resulted in that direct json webservice orderloader requests caused a NPE on the server. The getGeneratedJavascriptFilename method in the MobileStaticResourceComponent method expected the parameters of the MobileStaticResourceComponent to contain the ServletContext. This was not the case.

The code review also showed that the MobileStaticResourceComponent was ApplicationScoped but the parameters of the component were set at each request, resulting in potential unsafe thread behavior.
Steps To ReproduceDo a direct webservice call to the orderloader, for example see the performance build jmeter files or use the POSOrderCashupPerformanceTest class.
Proposed SolutionMake sure that the parameters are set correctly when the static file name is generated.
Make the MobileStaticResourceComponent not application scoped anymore, so request based to prevent race conditions.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0028251RR15Q1 closedmarvintm Improved behavior of the Web POS update in case the user doesn't manually refresh the page after the update is done 

-  Notes
(0072165)
hgbot (developer)
2014-11-30 20:03

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 6ea902cef0dfa499eaba07acdee8d89951489eb7
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Nov 30 20:03:29 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6ea902cef0dfa499eaba07acdee8d89951489eb7 [^]

Fixes issue 28324: Source change detection breaks build, non-thread safe handling of js code generation
Make MobileStaticResourceComponent request-thread-safe, move getParameterMap method to generic location, use
this method to make sure that the MobileStaticResourceComponent's parameters are set correctly.

---
M src/org/openbravo/mobile/core/MobileCoreComponentServlet.java
M src/org/openbravo/mobile/core/MobileCoreKernelUtils.java
M src/org/openbravo/mobile/core/MobileStaticResourceComponent.java
M src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
M src/org/openbravo/mobile/core/process/JSONProcessSimple.java
---

- Issue History
Date Modified Username Field Change
2014-11-30 19:49 mtaal New Issue
2014-11-30 19:49 mtaal Assigned To => mtaal
2014-11-30 19:49 mtaal Triggers an Emergency Pack => No
2014-11-30 20:00 mtaal Relationship added caused by 0028251
2014-11-30 20:03 hgbot Checkin
2014-11-30 20:03 hgbot Note Added: 0072165
2014-11-30 20:03 hgbot Status new => resolved
2014-11-30 20:03 hgbot Resolution open => fixed
2014-11-30 20:03 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6ea902cef0dfa499eaba07acdee8d89951489eb7 [^]
2014-12-01 11:06 marvintm Review Assigned To => marvintm
2014-12-01 11:06 marvintm Status resolved => closed
2014-12-01 11:06 marvintm Fixed in Version => RR15Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker