Notes |
|
(0070082)
|
mtaal
|
2014-09-11 10:41
|
|
Hi Rafa,
Some comments:
- the code which is in the getGenFileName in the MobileCoreApplicationCacheComponent should be moved completely to the MobileStaticResourceComponent component. So there is one place where this is done. (note that the 2 codes are even different now, so is a bug :-)
- no need to use a static, better to use injection here
- make the code which actually generates the js file synchronized so it is called once
- not sure how often the generate or isDevelopment is called, if a lot the isDevelopment should be cached
gr. Martin |
|
|
(0070086)
|
hgbot
|
2014-09-11 17:01
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8d602e983f7f8ff604f402365c38d4fe4e58e1b3
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Thu Sep 11 17:01:03 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8d602e983f7f8ff604f402365c38d4fe4e58e1b3 [^]
Fixes issue 27555: Mobile core will correctly generate the javascript when its first accessed
---
M src/org/openbravo/mobile/core/MobileCoreApplicationCacheComponent.java
M src/org/openbravo/mobile/core/MobileStaticResourceComponent.java
---
|
|
|
(0070091)
|
hgbot
|
2014-09-12 01:10
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c9c6593cbfb87b812b3a35c367ea616c7ebe95da
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Fri Sep 12 01:09:33 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c9c6593cbfb87b812b3a35c367ea616c7ebe95da [^]
Related to issue 27555: the logic for the generation of the javascript file has seen the following changes:
- the decision of if a new file must be generated is now centralized in the synchronized 'generateStaticResources' method
- fixed the inDevelopment mode
- fixed the check if the file exists
- better comments
---
M src/org/openbravo/mobile/core/MobileStaticResourceComponent.java
---
|
|
|
(0070336)
|
hgbot
|
2014-09-24 23:39
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 97ff2c91e221b23b6288206a97daa931e4229bf1
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Sep 24 23:38:48 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/97ff2c91e221b23b6288206a97daa931e4229bf1 [^]
Fixes issue 27555: The decision to create a new javascript file and to keep them have been modified:
A new file is created when:
- each time tomcat is started
- a module changes its version
- a module is 'in development'
- if the file does not exists
Only 1 mobile.core generated file will be present
- all mobile.core generated files will be removed, as only the last one is valid and no terminal should use any other
Notes:
- the file will allways have the mobile.core suffix ('_OBMOBCR' as of now)
- to force the creation of a new one:
1. delete the file from the /WebContent/web/js/gen directory
2. restart tomcat
3. only while developing and not to need a module 'in development'; add 'isModuleVersionChange = true;' just before the 'if (generatedJavascriptFilename == null //' line
---
M src/org/openbravo/mobile/core/MobileStaticResourceComponent.java
---
|
|
|
|
Code reviewed
tested:
Simulating a slow static resources generation by adding sleeps appcache is not served till the actual js file is already created |
|