Meetu Maltiar's Blog

Meetu's thoughts on technology and software development

Archive for September 5th, 2010

Problems When Deploying Working Application on Google App Engine

with one comment


Google Dev and production environment has differences. You may run into problems if you expect that application will also run fine on app engine if there are no errors on app engine development server. We are in process of porting an existing application on Google App engine. The application we are building uses Wicket, Spring and JPA. If you read the will it play in app engine you will find that Spring is compatible, Jpa works with datanucleus implementation and Wicket is semi compatible.

Most of the work required for porting the application required changes in data layer of the application. You can read more about the way to use jpa for persistence in Google App engine here. Wicket does work with the workarounds mentioned here. For wicket application we need to enable sessions in app engine config file.

<sessions-enabled>true</sessions-enabled>

Second we need to disable thread monitoring resource watcher.

@override
protected void init() {
	super.init();
	this.getResourceSettings().setResourcePollFrequency(null);
}

and at last we need to override the newSessionStore() to return HttpSession store because the default second level session store uses java.io.File which Google App Engine does not allow.

@override
protected void newSessionStore() {
	return new HttpSessionStore(this);
}

Read the rest of this entry »

Written by Meetu Maltiar

September 5, 2010 at 13:12

Posted in Cloud, Java

Tagged with , , , , ,