springuser2014 / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Make it possible to run wro4j on GAE #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Due to Google App Engine limitation, applications using wro4j cannot be 
deployed on GAE. Provide a customization to make it possible.

Original issue reported on code.google.com by alex.obj...@gmail.com on 27 Jul 2010 at 2:34

GoogleCodeExporter commented 9 years ago
This is possible and was documented in FAQ:

GAE has some limitations on deployed applications. For instance, you cannot use 
JMX or you cannot create threads from within deployed application. By default 
wro4j enables JMX usage. In order to be sure that wro4j is compliant with GAE 
limitations, you have to apply some changes:
  <filter>
    <filter-name>WebResourceOptimizer</filter-name>
    <filter-class>
      ro.isdc.wro.http.WroFilter
    </filter-class>
    <init-param>
      <param-name>configuration</param-name>
      <param-value>DEPLOYMENT</param-value>
    </init-param>
    <init-param>
      <param-name>jmxEnabled</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>cacheUpdatePeriod</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>modelUpdatePeriod</param-name>
      <param-value>0</param-value>
    </init-param>
  </filter>
There are a couple of things to mention:

jmxEnabled init param is set to false. This will disable the JMX usage of wro4j.
cacheUpdatePeriod & modelUpdatePeriod are set to 0. That means that there will 
be no scheduler responsible for updating of the cache and model. By default 
these values are 0, so it could be easier just to not put any of these two 
init-params.

Original comment by alex.obj...@gmail.com on 28 Jul 2010 at 8:29