<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Dan Walmsley &#187; appengine</title>
	<atom:link href="http://www.danwalmsley.com/tag/appengine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danwalmsley.com</link>
	<description>Putting the nerd in comnerdedy</description>
	<lastBuildDate>Thu, 03 Jun 2010 23:38:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2006-2007 </copyright>
		<managingEditor>dan@danwalmsley.com (Dan Walmsley)</managingEditor>
		<webMaster>dan@danwalmsley.com (Dan Walmsley)</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Putting the nerd in comnerdedy</itunes:summary>
		<itunes:author>Dan Walmsley</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>Dan Walmsley</itunes:name>
			<itunes:email>dan@danwalmsley.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.danwalmsley.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.danwalmsley.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Dan Walmsley</title>
			<link>http://www.danwalmsley.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Apache Wicket on Google App Engine for Java</title>
		<link>http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/</link>
		<comments>http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 08:02:36 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[googleappengine]]></category>
		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://www.danwalmsley.com/?p=220</guid>
		<description><![CDATA[Holy smokes, that was easy. I&#8217;ve got a basic Wicket app running on Google App Engine in under 2 minutes.
3 small traps for the unwary. First of all, you need to enable sessions in your appengine config file.

    &#60;sessions-enabled&#62;true&#60;/sessions-enabled&#62;

Secondly, add the following line into your WebApplication&#8217;s init() method:

	@Override
	protected void init&#40;&#41; &#123;
		super.init&#40;&#41;;
&#160;
		//remove thread [...]]]></description>
			<content:encoded><![CDATA[<p>Holy smokes, that was easy. I&#8217;ve got a basic Wicket app running on Google App Engine in under 2 minutes.</p>
<p>3 small traps for the unwary. First of all, you need to enable sessions in your appengine config file.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sessions-enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sessions-enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Secondly, add the following line into your WebApplication&#8217;s init() method:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">	@Override
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//remove thread monitoring from resource watcher</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getResourceSettings</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setResourcePollFrequency</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Thirdly, override the newSessionStore() method to return HttpSessionStore, because the default second level session store uses java.io.File, which Google App Engine doesn&#8217;t allow:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">	@Override
	<span style="color: #000000; font-weight: bold;">protected</span> ISessionStore newSessionStore<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>	
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> HttpSessionStore<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//		return new SecondLevelCacheSessionStore(this, new InMemoryPageStore());</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>That&#8217;s because Google App Engine doesn&#8217;t want you spawning threads. Obvious enough.</p>
<p>So that&#8217;s it! You&#8217;re in a Wicket-land of infinite scalability&#8230;</p>
<p>(I&#8217;m sure there&#8217;s more to it but I was excited&#8230;)</p>
<p>See my stupid test here: http://transitplatform.appspot.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
