Tapestry apps should run fine on Google App Engine (GAE) if you follow certain important steps.
Required Configuration Settings
tapestry.production-modeto true (to turn off live class reloading, among other things)
tapestry.restrictive-environmentconfiguration symbol to true (to prevent Tapestry from writing exception reports and cached resources to the file system)
tapestry.thread-pool-enabledconfiguration symbol to false (to prevent Tapestry's PeriodicExecutor from attempting to spawn threads)
Your application's module class (generally AppModule.java) can set these symbols where it sets others (either in a method named contributeApplicationDefaults or one annotated with @ApplicationDefaults and @Contribute), as shown below.
NOTE: Setting production mode to true is generally only desirable in production and QA/testing environments, but you can override that symbol with a JVM system property (
-Dtapestry.production-mode=false) in those environments.
- Make sure all objects that you store in the servlet session -- particularly those annotated with @SessionState and @SessionAttribute – are actually serializable types. Otherwise you may see strange behavior in which objects seem to lose their session values.
- If you use the Tapestry-upload module (or any file upload mechanism, for that matter), you'll need to be sure that it is configured to not store temporary uploaded files on the file system. See Uploading Files – particularly the
upload.repository-thresholdsymbol, which should be set to a large value.
Other than the above settings, Tapestry should provide no impediment to running your app under Google App Engine. However, you still need to adhere to all of GAE's usual constraints (as with any app, Tapestry or otherwise). Please carefully read Google's documentation for general guidelines for creating an app that is compatible with GAE.