<?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/"
	>

<channel>
	<title>The Java Momentum</title>
	<atom:link href="http://javamomentum.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://javamomentum.be</link>
	<description>Daily life of a Java Software Engineer.</description>
	<lastBuildDate>Thu, 22 Dec 2011 07:56:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Pecha Kucha &#8211; Gamification</title>
		<link>http://javamomentum.be/2011/12/pecha-kucha-gamification/</link>
		<comments>http://javamomentum.be/2011/12/pecha-kucha-gamification/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 09:32:50 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[varia]]></category>
		<category><![CDATA[gamification]]></category>
		<category><![CDATA[jcc]]></category>
		<category><![CDATA[pecha kucha]]></category>
		<category><![CDATA[realdolmen]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=253</guid>
		<description><![CDATA[Vrijdag 16 december was het laatste Java Café van 2011. Ondanks het gure weer en de (aangekondigde) BOB-campagne hebben een 30-tal collega&#8217;s de avond gezellig en droog doorgebracht in Introvert, Gent. Naast een lekkere maaltijd stonden een technology speed dating en een Pecha Kucha,gepresenteerd door ondergetekende, op het menu. Ik schrijf deze blog niet enkel [...]]]></description>
			<content:encoded><![CDATA[<p>Vrijdag 16 december was het laatste Java Café van 2011. Ondanks het gure weer en de (aangekondigde) BOB-campagne hebben een 30-tal collega&#8217;s de avond gezellig en droog doorgebracht in Introvert, Gent. Naast een lekkere maaltijd stonden een technology speed dating en een Pecha Kucha,gepresenteerd door ondergetekende, op het menu.</p>
<p>Ik schrijf deze blog niet enkel om de Powerpoint te delen, maar ook om eens te vertellen over hoe ik begonnen ben aan deze nieuwe frisse aanpak van presentaties.</p>
<p>Voor de ongeduldigen, hier is de presentiatie:</p>
<div style="width:425px" id="__ss_10634594"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/sander_devos/pecha-kucha-gamification" title="Pecha Kucha - Gamification" target="_blank">Pecha Kucha &#8211; Gamification</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/10634594" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/sander_devos" target="_blank">Sander De Vos</a> </div>
</p></div>
<h1>Wat is een pecha kucha</h1>
<p>Om geen open deur in te trappen zijn hier enkele URL&#8217;s waar je je kunt inlezen: <a href="http://en.wikipedia.org/wiki/Pecha_Kucha">Wikipedia</a>, <a href="http://www.pecha-kucha.org/">pecha-kucha.org</a>, <a href="http://www.vacature.com/blog/pecha-kucha-succesvol-presenteren-6-minuten">Vacature.com</a>.</p>
<p>Pecha Kucha is een originele manier om ideeën over te brengen aan een publiek. Het volgt de 20&#215;20 regel: 20 slides, 20 seconden elk, wat een totaal van 6 minuten 40 seconden geeft aan de spreker. Dit kader dwingt de spreker om geen overbodige informatie op slides te zetten en enkel de kern van zijn boodschap over te brengen op een visuele manier. Wanneer je zoekt op youtube kun je enkele goede voorbeelden vinden van Pecha Kucha presentaties.</p>
<h1>Waarover kun je het hebben</h1>
<p>Maakt echt niet uit. Alles is mogelijk, zolang je het zelf maar interessant kunt overbrengen op je publiek. Er is helemaal geen verplichting om het over werk te hebben.</p>
<h1>Hoe ben ik er aan begonnen</h1>
<p>Alles begint met een idee. Ik lees in mijn vrije tijd blogs en artikels op het internet en vond <a href="http://en.wikipedia.org/wiki/Gamification">gamification </a> wel de moeite waard om eens 6 minuten over te vertellen.</p>
<p>Ik ben beginnen zoeken op Slideshare naar presentaties over dit onderwerp door andere sprekers. Ik heb mij gebaseerd op twee presentaties, van samen +300 slides. Dit werd ingekort naar een verhaal met volgende voorbereiding:</p>
<ul>
<li>Welk gedrag of welke toepassingen kan ik aanspreken in het publiek zodat ze onmiddelijk weten waarover het gaat (hoe impacteert mijn idee hen)</li>
<li>Welke voorbeelden uit dagelijkse activiteiten kan ik toelichten</li>
<li>Wat is gamification</li>
<li>Waar gebruikt men gamification (met bekende voorbeelden)</li>
<li>Waar moet je op letten bij gamification, wat zijn de pitfalls</li>
</ul>
<p>Dit verhaal goot ik dan samen met behulp van afbeeldingen en visuele elementen die ik op internet vond. </p>
<h1>Presentatie zelf</h1>
<p>Over inhoud kon ik nog enkele minuten blijven voorpraten <img src='http://javamomentum.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Toch enkele pointers:</p>
<ul>
<li>Beperk je pecha kucha tot 1 enkel idee, en wijk hier niet van af. Beter 1 consistent verhaal dan onsamenhangende oneliners</li>
<li>    Aan oneliners en krachtige zinnen heb je voldoende. Een voorbereiding met volzinnen is helemaat niet nodig.</li>
<li>    Oefen thuis het 20&#215;20 kader, 20 seconden is helemaal niet veel.</li>
</ul>
<h1>Conclusie</h1>
<p>De ervaring van zelf een Pecha Kucha te geven is zeker aan aanrader. Het maakt je veel bewuster van wat een presentatie goed maakt. De focus die je als spreker moet leggen op je verhaal, rekening houdend met het kader ( 20&#215;20 ), doen je stil staan bij de kern van een presentatie: een boodschap overbrengen op je doelpubliek.</p>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2011/12/pecha-kucha-gamification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unix Background Jobs 101</title>
		<link>http://javamomentum.be/2011/04/unix-background-jobs-101/</link>
		<comments>http://javamomentum.be/2011/04/unix-background-jobs-101/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 20:46:18 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[varia]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=232</guid>
		<description><![CDATA[On my current project I&#8217;m working with a virtual Ubuntu machine on which Weblogic and DB2 are installed. Weblogic starts with the ./startWeblogic.sh command, and log files are written to a logfile &#8216;weblogic.xml&#8217; : ./startWebLogic.sh > weblogic.log You may go wild with opening multiple terminals and switching between them, but I hate the fact that [...]]]></description>
			<content:encoded><![CDATA[<p>On my current project I&#8217;m working with a virtual Ubuntu machine on which Weblogic and DB2 are installed. Weblogic starts with the ./startWeblogic.sh command, and log files are written to a logfile &#8216;weblogic.xml&#8217; :</p>
<pre>./startWebLogic.sh > weblogic.log</pre>
<p>You may go wild with opening multiple terminals and switching between them, but I hate the fact that the weblogic process is just taking up an entire window, even though it&#8217;s essentially meant to be a background process! This is where some basic unix commands kick in: run a long-lasting command or script as a background job, execute it in the background, bring it back to the foreground, see all running background jobs and (possibly) kill them. Let&#8217;s go.</p>
<h2>Spawning a background job</h2>
<p>This code fragment simulates a 10second command. Notice that the cursor isn&#8217;t available until the 10seconds are over.</p>
<pre>sleep 10</pre>
<p>Append your command with an ampersand ( &amp; ), to run it in the background. The cursor is immediately available.</p>
<pre>sleep 10 &#038;</pre>
<p>You may wonder already, &#8216;but how do I know the command is finished?&#8217;. See the chapter about &#8216;showing all background jobs&#8217; for that.</p>
<h2>Send the current executing command to the background and back</h2>
<p>Suppose you forgot the &amp; , or a command is taking longer than expected. You don&#8217;t need to quit (CTRL-C) the command, and re-execute it with the &amp;. You can send the current executing command to the background by pressing CTRL-Z.</p>
<pre>
sander@sander-ThinkPad-T510:~$ sleep 20
^Z
[1]+  Stopped                 sleep 20
</pre>
<p>Notice the fact that the job was stopped (paused should be a better name). Execute the <strong>bg</strong> command to make the job continue.</p>
<pre>
sander@sander-ThinkPad-T510:~$ bg
[1]+ sleep 20 &#038;
sander@sander-ThinkPad-T510:~$ fg
sleep 20
</pre>
<p>To demonstrate this, you can execute the<strong>fg</strong> command to make it come back to the foreground again.  You can bring back any background job to the foreground using this command. No parameters will show the most recent  background job, passing %1 will show process with id 1, %2 with id 2, etc.</p>
<p>You can bring a background job to the foreground using fg command. When executed without arguments, it will take the most recent background job to the foreground.</p>
<h2>Showing all background jobs</h2>
<p>When using this technique a lot, you might send multiple commands to the background. To show all current background process, execute the <strong>jobs</strong> command.</p>
<pre>
sander@sander-ThinkPad-T510:~$ jobs
[1]   Running                 sleep 30 &#038;
[2]-  Running                 sleep 25 &#038;
[3]+  Running                 sleep 20 &#038;
</pre>
<h2>Killing background jobs (OPTIONAL)</h2>
<p>Suppose you sent a command to the background you want to kill immediatly. The <strong>kill</strong> commando can&#8217;t only kill processes, but also background jobs.</p>
<pre>
sander@sander-ThinkPad-T510:~$ sleep 25 &#038;
[1] 21153
sander@sander-ThinkPad-T510:~$ sleep 25 &#038;
[2] 21156
sander@sander-ThinkPad-T510:~$ sleep 25 &#038;
[3] 21157
sander@sander-ThinkPad-T510:~$ kill %2
sander@sander-ThinkPad-T510:~$ jobs
[1]   Running                 sleep 25 &#038;
[2]-  Terminated              sleep 25
[3]+  Running                 sleep 25 &#038;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2011/04/unix-background-jobs-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VisualVM 1.3.2 released. Profiling and monitoring on the JVM</title>
		<link>http://javamomentum.be/2011/04/visualvm1-3-2-released-profiling-and-monitoring-on-the-jvm/</link>
		<comments>http://javamomentum.be/2011/04/visualvm1-3-2-released-profiling-and-monitoring-on-the-jvm/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 18:05:20 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=218</guid>
		<description><![CDATA[VisualVM is a tool to monitor and troubleshoot Java applications. It runs on Oracle/Sun JDK 6, but is able to monitor applications running on JDK 1.4 and higher. It utilizes various available technologies like jvmstat, JMX, the Serviceability Agent (SA), and the Attach API to get the data and automatically uses the fastest and most [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://visualvm.java.net/" target="_blank">VisualVM</a> is a tool to monitor and troubleshoot Java  applications. It runs on Oracle/Sun JDK 6, but is able to monitor  applications running on JDK 1.4 and higher. It utilizes                 various available technologies like jvmstat, JMX, the  Serviceability Agent (SA), and the Attach API to get the data and  automatically uses the fastest and most lightweight technology                 to impose minimal overhead on monitored applications.</p>
<p>With the out-of-the-box features it perfectly fits all  the requirements of application developers, system administrators,  quality engineers and &#8211; last but not least &#8211;                  application users submitting bug reports containing all  the necessary information.</p>
<p>This is definitely a tool to check out!</p>
<p>See the video for yourself, it shows all the features! Or<a href="http://visualvm.java.net/download.html" target="_blank" > take it for a spin</a>!</p>
<p><embed src="http://blip.tv/play/AeGPcQI" type="application/x-shockwave-flash" width="480" height="390" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h2>Features</h2>
<table border="1" cellspacing="0" width="95%">
<tbody>
<tr>
<td><strong>Feature</strong></td>
<td width="15%"><strong>JDK 1.4.2<br />
<small>local/remote</small></strong></td>
<td width="15%"><strong>JDK 5<br />
<small>local/remote</small></strong></td>
<td width="15%"><strong>JDK 6<br />
<small>local</small></strong></td>
<td width="15%"><strong>JDK 6<br />
<small>remote</small></strong></td>
</tr>
<tr>
<td>Overview</td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
</tr>
<tr>
<td>System Properties (in Overview)</td>
<td></td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td></td>
</tr>
<tr>
<td>Monitor</td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
</tr>
<tr>
<td>Threads</td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
</tr>
<tr>
<td>Profiler</td>
<td></td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td></td>
</tr>
<tr>
<td>Thread Dump</td>
<td></td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td></td>
</tr>
<tr>
<td>Heap Dump</td>
<td></td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td></td>
</tr>
<tr>
<td>Enable Heap Dump on OOME</td>
<td></td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td></td>
</tr>
<tr>
<td>MBean Browser (plugin)</td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
</tr>
<tr>
<td>Wrapper for JConsole plugins (plugin)</td>
<td></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
<td><img src="http://visualvm.java.net/images/check.png" alt="Yes" /></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2011/04/visualvm1-3-2-released-profiling-and-monitoring-on-the-jvm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google App Engine with JSF2, CDI</title>
		<link>http://javamomentum.be/2011/04/google-app-engine-with-jsf2-cdi/</link>
		<comments>http://javamomentum.be/2011/04/google-app-engine-with-jsf2-cdi/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 21:32:26 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[cdi]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[jee6]]></category>
		<category><![CDATA[jsf2]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=160</guid>
		<description><![CDATA[Last night I wanted to play around with the Google App Engine. Google&#8217;s cloud service should ring a bell? Don&#8217;t worry if it doesn&#8217;t, you can read more about it and use this tutorial as your first GAE-project! Due to my interest in JEE6-technologies, I was interested whether the latest Google App Engine (1.4.3) supported [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I wanted to play around with the Google App Engine. Google&#8217;s cloud service should ring a bell? Don&#8217;t worry if it doesn&#8217;t, you can <a href="http://code.google.com/intl/nl/appengine/" _mce_href="http://code.google.com/intl/nl/appengine/" target="_blank">read more about it</a> and use this tutorial as your first GAE-project!</p>
<p>Due to my interest in JEE6-technologies, I was interested whether the <em>latest </em> Google App Engine (1.4.3) supported the <em>latest </em> technologies in Java: JSF2 for the view layer, and CDI ( Contexts and Dependency Injection for the Java EE Platform ) to wire everything up.</p>
<p>In this article I will briefly discuss what problems I have encountered while setting up this environment.</p>
<p><strong>Shortcut: </strong>If you&#8217;re only interested in the result, and want to get started right away, you can download the full eclipse project <a href="http://javamomentum.be/wp-content/uploads/2011/04/gae-jee6.zip" _mce_href="http://javamomentum.be/wp-content/uploads/2011/04/gae-jee6.zip">here</a>. <strong>No GAE or CDI dependencies!</strong></p>
<h2>Project Setup</h2>
<h3>JSF2 on the Google App Engine</h3>
<p>To get started, I advise you to follow the guide &#8216;<a href="https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine" _mce_href="https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine" target="_blank">Configuring JavaServer Faces 2.0 to run on the Google App Engine Using Eclipse</a>&#8216; described on the Google website. It is pretty much complete, well documented with screenshots, and a breeze to follow.</p>
<p>The guide will set up your IDE, configure the Google App Engine plugin, download and configure the required libraries for setting up JSF2 on the Google App Engine.</p>
<h3>Adding CDI</h3>
<p>Download <a href="http://sourceforge.net/projects/jboss/files/Weld/1.1.1.Final/weld-1.1.1.Final.zip/download" _mce_href="http://sourceforge.net/projects/jboss/files/Weld/1.1.1.Final/weld-1.1.1.Final.zip/download" target="_blank">Weld 1.1.1-FINAL</a>. Extract the download, it contains the following libraries which you need to add to the build path:</p>
<ol>
<li>cdi-api.jar</li>
<li>weld-api.jar</li>
<li>weld-core.jar</li>
<li>weld-servlet.jar</li>
</ol>
<p>Add the following listener to your <strong>web.xml </strong>:</p>
<pre>&lt;listener&gt;
    &lt;listener-class&gt;org.jboss.weld.environment.servlet.Listener&lt;/listener-class&gt;
&lt;/listener&gt;
</pre>
<p>To finalize the configuration of CDI in your GAE-application, add an empty beans.xml file to your WEB-INF folder. This is needed by default by CDI to enable classpath scanning.</p>
<h2>Problems encountered</h2>
<h3>Startup fails &#8211; InitialContext</h3>
<p>After following the Google tutorial on setting up JSF2 on GAE, you&#8217;ll notice something odd. Yes, your application isn&#8217;t starting up! <img src='http://javamomentum.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
This is the stracktrace:</p>
<pre>WARNING: Error starting handlers
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google  App Engine developer's guide for more details.
	at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
	at com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:578)
</pre>
<p>As you can see, the com.sun.faces.config.WebConfiguration class tries to load up an InitialContext in the processJndiEntries method. The InitialContext class is not allowed by the Google App Engine for obvious reasons.</p>
<p>When we take a look into the <a href="http://www.docjar.com/html/api/com/sun/faces/config/WebConfiguration.java.html" _mce_href="http://www.docjar.com/html/api/com/sun/faces/config/WebConfiguration.java.html" target="_blank">WebConfiguration.java</a> class ( love open-source! ), we can clearly see the InitialContext being loaded:</p>
<pre class="brush:java">private boolean canProcessJndiEntries() {

        try {
            Util.getCurrentLoader(this).loadClass("javax.naming.InitialContext");
        } catch (Exception e) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine(
                      "javax.naming is unavailable.  JNDI entries related to Mojarra configuration will not be processed.");
            }
            return false;
        }
        return true;

    }</pre>
<p>The App Engine is freaking out and throws the restricted class exception. Thanks to open-source we can clearly see what&#8217;s going on, and modify it to our own needs. Since we don&#8217;t need any JNDI-lookups, we can safely remove this method.</p>
<p>Copy paste the original java sourcefile to the same package in your project (com/sun/faces/config/), and comment out all references to the InitialContext.</p>
<p>You can download the result, for version jsf-impl-2.0.2-FCS.jar, <a href="http://javamomentum.be/wp-content/uploads/2011/04/jsf-impl-2.0.2-FCS-WebConfigution-GAE.zip" _mce_href="http://javamomentum.be/wp-content/uploads/2011/04/jsf-impl-2.0.2-FCS-WebConfigution-GAE.zip">here</a>.</p>
<h3>Enable Sessions</h3>
<p>Sessions are disabled by GAE by default. The following exception is thrown.</p>
<pre>java.lang.RuntimeException: Session support is not enabled in appengine-web.xml.  To enable sessions, put <sessions-enabled>true</sessions-enabled> in that file.  Without it, getSession() is allowed, but manipulation of sessionattributes is not.
	at com.google.apphosting.utils.jetty.StubSessionManager$StubSession.throwException(StubSessionManager.java:77)
	at com.google.apphosting.utils.jetty.StubSessionManager$StubSession.setAttribute(StubSessionManager.java:65)
</pre>
<p>The exception is well documented; as mentioned, you need to put <sessions-enabled>true</sessions-enabled> in the appengine-web.xml file.</p>
<h3>JSF configuration</h3>
<ol>
<li>GAE supports server state saving, so use the javax.faces.STATE_SAVING_METHOD param</li>
<li>Projectstage can be any one of the phases</li>
<li>The expressionfactory needs to be explicitly set due to a GAE-bug</li>
<li>We enable the xml validation checks</li>
<li>Spawning threads is disallowed in GAE. By setting the com.sun.faces.enableThreading param to false, JSF will not spawn childthreads</li>
</ol>
<pre>&lt;context-param&gt;
    &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
    &lt;param-value&gt;server&lt;/param-value&gt;
&lt;/context-param&gt;
&lt;context-param&gt;
    &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
    &lt;param-value&gt;Development&lt;/param-value&gt;
&lt;/context-param&gt;
&lt;context-param&gt;
    &lt;param-name&gt;com.sun.faces.expressionFactory&lt;/param-name&gt;
    &lt;param-value&gt;com.sun.el.ExpressionFactoryImpl&lt;/param-value&gt;
&lt;/context-param&gt;
&lt;context-param&gt;
    &lt;param-name&gt;com.sun.faces.validateXml&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
&lt;/context-param&gt;
&lt;context-param&gt;
    &lt;param-name&gt;com.sun.faces.enableThreading&lt;/param-name&gt;
    &lt;param-value&gt;false&lt;/param-value&gt;
&lt;/context-param&gt;
</pre>
<h2>References</h2>
<ul>
<li>Google Guide to configuring JSF 2.0 to run on the Google App Engine. I used this guide myself to get started, but some errors I encountered aren&#8217;t discussed in it. <a href="https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine" _mce_href="https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine" target="_blank">(link)</a><br _mce_bogus="1"></li>
<li>Article discussing the solution to the &#8216;javax.naming.InitialContext is a restricted class&#8217; problem. <a href="http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/" _mce_href="http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/">(link)</a><br _mce_bogus="1"></li>
<li>JavaServer Faces 2.0 and Google App Engine Compatibility Issues <a href="http://java.wildstartech.com/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine/javaserverfaces-20-and-google-app-engine-compatibility-issues" _mce_href="http://java.wildstartech.com/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine/javaserverfaces-20-and-google-app-engine-compatibility-issues" target="_blank">(link)</a><br _mce_bogus="1"></li>
<p><a href="http://java.wildstartech.com/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine/javaserverfaces-20-and-google-app-engine-compatibility-issues" _mce_href="http://java.wildstartech.com/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine/javaserverfaces-20-and-google-app-engine-compatibility-issues" target="_blank"><br />
</a><br _mce_bogus="1"></ul>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2011/04/google-app-engine-with-jsf2-cdi/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Opportuniteiten bij onderhoudsprojecten</title>
		<link>http://javamomentum.be/2011/03/opportuniteiten-bij-onderhoudsprojecten/</link>
		<comments>http://javamomentum.be/2011/03/opportuniteiten-bij-onderhoudsprojecten/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 15:28:17 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[varia]]></category>
		<category><![CDATA[dutch]]></category>
		<category><![CDATA[maintenance]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=133</guid>
		<description><![CDATA[Mijn vorige projecten waren allemaal Greenfield projecten, projecten die van scratch begonnen en waar ik een grote vrijheid kreeg om te ontwikkelen. Die vrijheid kon ik als ontwikkelaar benutten om nieuwe technologieën te introduceren, het component design zo &#8216;mooi&#8217; mogelijk te maken, laatste versies van libraries gebruiken, en zo meer. Je gebruikt ook je ervaring [...]]]></description>
			<content:encoded><![CDATA[<p>Mijn vorige projecten waren allemaal Greenfield projecten, projecten die van scratch begonnen en waar ik een grote vrijheid kreeg om te ontwikkelen. Die vrijheid kon ik als ontwikkelaar benutten om nieuwe technologieën te introduceren, het component design zo &#8216;mooi&#8217; mogelijk te maken, laatste versies van libraries gebruiken, en zo meer. Je gebruikt ook je ervaring om alles zo perfect mogelijk te maken en je te houden aan coding conventions, best practices, guidelines op te stellen. Dit zijn de soort projecten waar iedereen zich wel kan in vinden, niet?</p>
<h3>Het klantenverhaal&#8230;</h3>
<p><a href="http://javamomentum.be/wp-content/uploads/2011/03/wtfm.jpg"><img class="alignright size-medium wp-image-134" title="Code Quality" src="http://javamomentum.be/wp-content/uploads/2011/03/wtfm-300x271.jpg" alt="" width="300" height="271" /></a><br />
In September vorig jaar kreeg ik het nieuws dat ik kon beginnen bij een grote klant. Het is een mastodont van een overheidsinstelling: veel postjes in te vullen, veel projecten, veel bedrijven die &#8216;binnen proberen geraken&#8217;. Kortom, er zijn veel consultants die lange tijd op verschillende projecten meedraaien.</p>
<p>De applicatie draait op Struts 1.3.9, EJB3&#8242;s, een zelfgebouwd persistency-framework, een ononderhouden codebase met duplicatie van code, hacks, &#8216;everything-on-the-session&#8217;, String concatenation van soms +40 lijnen(dat is een widescreen laptopscherm vol met lijnen!), 614 VO&#8217;s BO&#8217;s BC&#8217;s Actions Forms zonder hergebruik, constants her en der, geen documentatie, you name it. De schok was groot.</p>
<h3>Challenge Accepted!</h3>
<p>Ik geef toe, ik had m&#8217;n twijfels toen ik dit project aanvaardde. Mijn grootste twijfel was of ik hier wel iets uit ging leren? Struts1, onderhoud, jsp&#8217;s, *geeuw*. Achteraf bekeken heb ik andere dingen bijgeleerd op dit project. Ik besefte dit pas toen ik het artikel &#8216;<a href="http://typicalprogrammer.com/?p=122" target="_blank">The Joys of Maintenance Programming</a>&#8216; las enkele weken terug.</p>
<h4>Je leert debuggen</h4>
<p>Iedereen weet ondertussen wel hoe hij debugged. Breakpoints zetten, je kent je component diagram, soms weet je gewoon al waar je moet kijken zonder te debuggen! Ik heb ondervonden dat het veel meer inspanning en doorzettingsvermogen vraagt om andermans code te begrijpen en te lezen. Stap voor stap moet je de oorzaak van het probleem proberen achterhalen. Misschien gebeurt er op andere plaatsen nóg meer? Of wordt het misschien herbruikt? Je kunt dus niet zomaar veronderstellingen maken, maar je moet je volledig &#8216;inleven&#8217; in de code.</p>
<blockquote><p>Het lezen en debuggen van vreemde code doet je nadenken over hoe de code (niet) werkt, in plaats van wat je denkt dat het zou moeten doen.</p></blockquote>
<h4>Je leert beter programmeren</h4>
<p>Het is duidelijk uit voorgaand punt dat het gemakkelijker is om goede code te debuggen dan slechte code. Goede code kan (hopelijk <img src='http://javamomentum.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) iedereen hier schrijven. Maar wat is slechte code? Wel, dit onderscheid zal je zeker en vast ondervinden op een onderhoudsproject. Je zult de &#8216;waarom&#8217; achter code moeten achterhalen, wat de bedoeling was van de programmeur. Ervaren programmeurs herkennen onmiddelijk het verschil tussen goede en slechte code, en omgaan met &#8216;meer code&#8217; (niet enkel die van jou of andere ervaren mensen) zal dit gevoel enkel versterken.</p>
<blockquote><p>Je ontwikkelt manieren om je weg te vinden in een onbekende codebase, en je zult een neus ontwikkelen voor code waar een reukje aan zit.</p></blockquote>
<h4>Je leert optimaliseren</h4>
<p>De originele programmeurs hebben hun pr<a title="premature optimization" href="http://c2.com/cgi/wiki?PrematureOptimization" target="_blank">emature optimizations</a> al kunnen doen (niet door laten verleiden! Premature optimization is the root of all evil). Jij kunt nu de échte efficiëntieproblemen en bottlenecks vaststellen. De originele programmeurs staken veel tijd en energie in wat zij als mogelijk performantieprobleem zagen. Problemen die misschien nooit zouden voorgevallen zijn, of die geen grote impact zouden gehad hebben.</p>
<p>Werkende systemen hebben reële performantieproblemen. Het is een heel nobele vaardigheid die de gebruikers zeker positief zullen onthalen om deze problemen te identificeren en er oplossingen voor te formuleren. Het zoeken en oplossen van deze problemen kan zelf leuk worden!</p>
<blockquote><p>Klanten merken altijd wanneer je hun applicatie sneller maakt, en appreciëren het enorm wanneer je er aan denkt om ze efficiënter te maken.</p></blockquote>
<h4>Je leert met gebruikers omgaan</h4>
<p>Bij greenfield projecten werk je vooral binnen het team. De analye is klaar, de business is gecontacteerd, de requirements liggen vast (althans, dat hoop je altijd). Nieuwe applicaties hebben geen echte gebruikers, je krijgt use cases en stakeholders. Bij onderhoudsopdrachten werk je met de eindgebruikers, vooral diegene die de applicatie dagelijks gebruiken en die zich ergeren aan de bugs of aan functionaliteit die niet of slecht werkt.</p>
<blockquote><p>Communiceren met eindgebruikers die uit een niet-IT-achtergrond komen doet je uit je IT-schelp kruipen. Hierdoor voel je je meer betrokken tot je werk.
</p></blockquote>
<p><i>This post was mentioned on <a href="http://rdnononsense.wordpress.com/2011/03/16/gastblog-sander-de-vos-opportuniteiten-door-onderhoudswerken/" target="_blank">RealDolmen NoNonsense Blog</a>, and <a href="http://www.dzone.com/links/opportuniteiten_bij_onderhoudsprojecten.html" target="_blank">DZone</i></p>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2011/03/opportuniteiten-bij-onderhoudsprojecten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy newyear</title>
		<link>http://javamomentum.be/2011/01/happy-newyear-fellow-geeks/</link>
		<comments>http://javamomentum.be/2011/01/happy-newyear-fellow-geeks/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 19:28:20 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[varia]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=120</guid>
		<description><![CDATA[Best of wishes for 2011! To celebrate this new year, take a look at some real nerdish history:]]></description>
			<content:encoded><![CDATA[<p>Best of wishes for 2011!</p>
<p>To celebrate this new year, take a look at some real nerdish history:<br />
<a href="http://javamomentum.be/wp-content/uploads/2011/01/geek-life.jpg"><img src="http://javamomentum.be/wp-content/uploads/2011/01/geek-life.jpg" alt="geek life history" title="geek-life" width="620" height="2227" class="aligncenter size-full wp-image-121" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2011/01/happy-newyear-fellow-geeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SFTP Server communication in Java using Jsch</title>
		<link>http://javamomentum.be/2010/09/sftp-server-communication-in-java-using-jsch/</link>
		<comments>http://javamomentum.be/2010/09/sftp-server-communication-in-java-using-jsch/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 20:54:32 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[varia]]></category>
		<category><![CDATA[Jsch]]></category>
		<category><![CDATA[maven2]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=90</guid>
		<description><![CDATA[Last week I had to write a Java software component that could connect to a SFTP server, read in flat files, process them through a business component, and then place a generated file back on the same server. The technical details about the SFTP protocol were unclear to me, so I started reading about it [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I had to write a Java software component that could connect to a SFTP server, read in flat files, process them through a business component, and then place a generated file back on the same server.</p>
<p>The technical details about the SFTP protocol were unclear to me, so I started reading about it on <a href="http://en.wikipedia.org/wiki/File_Transfer_Protocol#FTP_over_SSH_.28not_SFTP.29">wikipedia</a>. Basically SFTP is the same as SCP, a secure copy over SSH.</p>
<h2>Setup of a development environment</h2>
<p>Before anything else, I needed a SFTP server installed for development. I choose the trial version of the <a href="http://www.enterprisedt.com/">complete FTP suite-trial version</a>. This isn&#8217;t the only, nor the best SFTP server-suite out there. I can imagine using proftpd, ssh, core ftp, or other ftp software.</p>
<p>The only next big thing I had to do was generate a public/private keypair to authenticate myself, <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html"> PuTTy gen</a> came to the rescue. In my Server admin screen I linked the key to the user account and I was ready to start developing.</p>
<h2>JSch</h2>
<p>The search for existing Java libraries that helped me working with this SFTP server, didn&#8217;t yield the results I was hoping for. There wasn&#8217;t a &#8216;best&#8217; or &#8216;winning&#8217; API or framework that emerged from the search results.</p>
<p>I found that <a href="http://www.jcraft.com/jsch/">Jsch</a> was not only used by some big reference applications ( Ant(1.6 or later), Eclipse(3.0), NetBeans 5.0(and later), Maven Wagon, JIRA, and more), but it was also available in the Maven2 repository as a standalone library. I checked out the <a href="http://www.jcraft.com/jsch/examples/">examples on their website</a>, and found them to be very clear to me. These are also available on my Maven2 demo-project which you can find below.</p>
<p>All in all, I developed a small &#8216;push&#8217; and &#8216;get&#8217; component in my project in notime. You can find the relevant code attached to this post. You might think that this API is very lowlevel: commands as &#8220;ls&#8221;, &#8220;mkdir&#8221;, &#8220;get&#8221;, &#8220;cd&#8221;, &#8230; are all avaible in simple method calls. In my opinion, this is a good thing, because in these matters you want to have full control over your communication with the server.</p>
<h2>Demo</h2>
<p>This Demo will try connect to a given sftp server, list all directories and files in the home directory and exit. For getPrivateKeyAsByteStream(); implementations, take a look at FileUtils in apache-commons or look for code online.<br />
To run this demo, you should either include Jsch on your classpath, or download my Maven2 project <a href="http://javamomentum.be/wp-content/uploads/2010/09/jsch-demo.zip">here</a>.</p>
<pre class="brush:java">
public class SftpDemo {

	private static final String HOST = "127.0.0.1";
	private static final int PORT = 22;
	private static final String USER = "test";
	private static final String PRIVATE_KEY_LOCATION = "C:\\sftpkeys\\private_openssh";

	public static void main(String[] args) throws Exception {
		JSch.setLogger(new MyJschLogger());
		JSch jSch = new JSch();
		final byte[] privateKey = getPrivateKeyAsByteStream();
		final byte[] password = "certPass".getBytes();
		jSch.addIdentity(USER,
				privateKey,
				null,
				password
		);

                // TODO: remove this line in real life. Work with known_hosts!
		Session session = jSch.getSession(USER, HOST, PORT);
		Properties config = new Properties();
		config.put("StrictHostKeyChecking", "no");
		session.setConfig(config);

		session.connect();
		Channel channel = session.openChannel("sftp");
		ChannelSftp sftp = (ChannelSftp) channel;
		sftp.connect();

		final Vector files = sftp.ls(".");
		Iterator itFiles = files.iterator();
		while (itFiles.hasNext()) {
			System.out.println("Index: " + itFiles.next());
		}

		final ByteArrayInputStream in = new ByteArrayInputStream(
				"This is a sample text".getBytes());

		sftp.put(in, "test.txt", ChannelSftp.OVERWRITE);

		sftp.disconnect();
		session.disconnect();

	}
</pre>
<p>This logger is a standard implementation, taken from the JSch-examples. It&#8217;s nice to see what&#8217;s happening behind the scenes. You should opt for logging frameworks when using Jsch in your project (and in all other cases too of course).</p>
<pre class="brush:java">
	static class MyJschLogger implements Logger {
		static java.util.Hashtable name = new java.util.Hashtable();
		static {
			name.put(new Integer(DEBUG), "DEBUG: ");
			name.put(new Integer(INFO), "INFO: ");
			name.put(new Integer(WARN), "WARN: ");
			name.put(new Integer(ERROR), "ERROR: ");
			name.put(new Integer(FATAL), "FATAL: ");
		}

		public boolean isEnabled(int level) {
			return true;
		}

		public void log(int level, String message) {
			System.err.print(name.get(new Integer(level)));
			System.err.println(message);
		}

	}

}</pre>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2010/09/sftp-server-communication-in-java-using-jsch/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Holiday&#8217;s over, what&#8217;s next ?</title>
		<link>http://javamomentum.be/2010/07/holidays-over-whats-next/</link>
		<comments>http://javamomentum.be/2010/07/holidays-over-whats-next/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 13:00:11 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[holiday]]></category>
		<category><![CDATA[new york]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=71</guid>
		<description><![CDATA[At last, back in Belgium behind my desk and finding some time to write something. New York is amazing, it opens up your view over the world. Words cannot describe the feeling when sitting on the red stairs in Times Square, feeling the everlasting energy and vibes of Times Square. After 7 days of exploring [...]]]></description>
			<content:encoded><![CDATA[<p>At last, back in Belgium behind my desk and finding some time to write something.</p>
<p><div id="attachment_73" class="wp-caption alignright" style="width: 310px"><a href="http://javamomentum.be/wp-content/uploads/2010/07/DSC031041.jpg"><img src="http://javamomentum.be/wp-content/uploads/2010/07/DSC031041-300x225.jpg" alt="Times Square, New York" title="Times Square, New York" width="300" height="225" class="size-medium wp-image-73" /></a><p class="wp-caption-text">Times Square, New York</p></div><br />
New York is amazing, it opens up your view over the world. Words cannot describe the feeling when sitting on the red stairs in Times Square, feeling the everlasting energy and vibes of Times Square.</p>
<p>After 7 days of exploring the citylife, the two weeks at the Belgian Coast were very welcome.</p>
<p>In a few days I will be recommencing my daily job as a Java Software Engineer and blogging things as they happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2010/07/holidays-over-whats-next/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RichFaces 4 Alpha Released</title>
		<link>http://javamomentum.be/2010/06/richfaces-4-alpha-released/</link>
		<comments>http://javamomentum.be/2010/06/richfaces-4-alpha-released/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 18:46:26 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[varia]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[jsf2]]></category>
		<category><![CDATA[maven2]]></category>
		<category><![CDATA[richfaces]]></category>
		<category><![CDATA[richfaces4]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=49</guid>
		<description><![CDATA[Today, the RichFaces 4 Alpha 2 was released. For an overview of what&#8217;s new in JSF2 and the possibilities, check out this blog by Andy Schwartz for a complete review with lots of links and documentation. Quote from the Richfaces Project Page RichFaces is a component library for JSF and an advanced framework for easily [...]]]></description>
			<content:encoded><![CDATA[<p>Today, the RichFaces 4 Alpha 2 <a href="http://in.relation.to/Bloggers/RichFaces400Alpha2Released" target="blank">was released</a>. For an overview of what&#8217;s new in JSF2 and the possibilities, check out <a href="http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/" target="_blank">this blog by Andy Schwartz</a>  for a complete review with lots of links and documentation.</p>
<blockquote><p>
<i>Quote from the <a href="http://www.jboss.org/richfaces" target="blank">Richfaces Project Page</a></i><br />
RichFaces is a component library for JSF and an advanced framework for easily integrating AJAX capabilities into business applications.</p>
<ul>
<li>100+ AJAX enabled components in two libraries</li>
<ul>
<li>a4j: page centric AJAX controls</li>
<li>rich: self contained, ready to use components</li>
</ul>
<li>Whole set of JSF benefits while working with AJAX</li>
<li>Skinnability mechanism</li>
<li>Component Development Kit (CDK)</li>
<li>Dynamic resources handling</li>
<li>Testing facilities for components, actions, listeners, and pages</li>
<li>Broad cross-browser support</li>
<li>Large and active community</li>
</ul>
<h5>JSF 2 and RichFaces 4</h5>
<p>We are working hard on RichFaces 4.0 which will have full JSF 2 integration.  That is not all though, here is a summary of updates and features:</p>
<ul>
<li>Redesigned modular repository and build system.</li>
<li>Simplified Component Development Kit  with annotations, faces-config extensions, advanced templates support and more..</li>
<li>Ajax framework improvements extending the JSF 2 specification.</li>
<li>Component review for consistency, usability, and redesign following semantic HTML principles where possible.</li>
<li>Both server-side and client-side performance optimization.</li>
<li>Strict code clean-up and review.</li>
</ul>
</blockquote>
<p>I followed the tutorial on how to get a project up and running from <a href="http://community.jboss.org/wiki/HowtoaddRichFaces4xtomavenbasedproject" target="_blank">this JBoss Community article</a> and started work on a clean skeleton. On this blank project I will be experimenting with JSF2 and richfaces components in the near future. </p>
<p>With this blank project in mind, I created following architecture:</p>
<ul>
<li>Maven2 Project</li>
<li>Reference JSF2 API and IMPL</li>
<li>RichFaces 4.0.0.Alpha2 component library</li>
</ul>
<p>You can immediatly start experimenting by importing this Maven2 project in your favourite IDE (mvn eclipse:eclipse goal is configured). Have fun!</p>
<h3><a href="http://javamomentum.be/wp-content/uploads/2010/06/richfaces-4-alpha-example.zip">Download Maven2 Skeleton</a></h3>
<h3><a href="http://javamomentum.be/wp-content/uploads/2010/06/richfaces-4-demo.war_.zip">Download WAR</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2010/06/richfaces-4-alpha-released/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>GoF Java Design Patterns in the Java SE and Java EE API</title>
		<link>http://javamomentum.be/2010/06/gof-java-design-patterns-in-the-java-se-and-java-ee-api/</link>
		<comments>http://javamomentum.be/2010/06/gof-java-design-patterns-in-the-java-se-and-java-ee-api/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 13:40:48 +0000</pubDate>
		<dc:creator>Sander De Vos</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[varia]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[jdk]]></category>

		<guid isPermaLink="false">http://javamomentum.be/?p=14</guid>
		<description><![CDATA[Today I had the opportunity to write a reusable component for the project I am currently working on. Because I had the freedom to write it from scratch, I looked into some of the design patterns that are commonly used in the process of Software Engineering. While I refreshed some of the common design patterns, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had the opportunity to write a reusable component for the project I am currently working on. Because I had the freedom to write it from scratch, I looked into some of the design patterns that are commonly used in the process of Software Engineering.</p>
<p>While I refreshed some of the common design patterns, I found this nice thread on <a href="http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns/2707195#2707195" title="Stack Overflow" target="_blank" >Stack Overflow &#8211; <i>Examples of gof design patterns</i></a>. It offers an overview of design patterns that are being used in the Sun Java SE and JavaEE API. Since the sun JDK is open-source and thus free for all, it&#8217;s easy for you to take a look into its source code and learn from the better implementations of these patterns.<br />
<a href="http://javamomentum.be/wp-content/uploads/2010/06/design-patterns-book-cover.png"><img src="http://javamomentum.be/wp-content/uploads/2010/06/design-patterns-book-cover-229x300.png" alt="" title="design-patterns-book-cover" width="229" height="300" class="alignright size-medium wp-image-34" /></a><br />
Some of the patterns that are linked into the JDK: </p>
<ul>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Abstract_factory_pattern">Abstract Factory Pattern </a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Builder_pattern">Builder</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Method</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Prototype_pattern">Prototype</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Adapter_pattern">Adapter</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Bridge_pattern">Bridge</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Composite_pattern">Composite</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Decorator_pattern">Decorator</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Facade_pattern">Façade</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Proxy_pattern">Proxy</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Chain_of_responsibility_pattern">Chain of responsibility</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Command_pattern">Command</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Interpreter_pattern">Interpreter</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Iterator_pattern">Iterator</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Observer_pattern">Observer (Publish/Subscribe)</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Strategy_pattern">Strategy</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Template_method_pattern">Template method</a></li>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Visitor_pattern">Visitor</a></li>
<li> &#8230; and more </li>
</ul>
<p>Just <a href="http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns/2707195#2707195" title="Stack Overflow" target="_blank" >take a look</a> for yourself! Keep your favourite IDE open with sources attached!</p>
]]></content:encoded>
			<wfw:commentRss>http://javamomentum.be/2010/06/gof-java-design-patterns-in-the-java-se-and-java-ee-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

