Wicket On Google App Engine (GAE) – Deployment Configuration

Just a quick tip – generally with Wicket we want to supply our application with a way to choose between “Development” vs. “Deployment” mode automatically, so that we can get stack traces etc. during development and disable development features for deployment. Google App Engine sets a convenient JVM property to enable this -

class MyWicketApplication extends Application {
   .....
    private boolean isProd =
        "Production".equalsIgnoreCase(
            System.getProperty("com.google.appengine.runtime.environment"));

    @Override
    public String getConfigurationType() {
        return (isProd ? "DEPLOYMENT" : "DEVELOPMENT");
    }
}

Bam – Wickety GAE love!

Related posts:

  1. Wicket – forcing page reload on browser back button…
  2. Where Does Wicket Store It’s DiskPageStore Files?
  3. AOP, Annotation-based caching solution for Guice projects…
  4. visural-wicket 0.5 released – ready for action!
  5. Announcing – visural-wicket

This entry was posted in Java, Software Engineering and tagged app-engine, Google, Java, open-source, tips, wicket. Bookmark the permalink.

One Response to Wicket On Google App Engine (GAE) – Deployment Configuration

  1. Andrew Myers says:

    Nice tip – thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>