<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Antonio's Blog</title>
	<atom:link href="http://agoncal.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://agoncal.wordpress.com</link>
	<description>A blog mainly about Java</description>
	<lastBuildDate>Thu, 14 Jan 2010 12:32:28 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='agoncal.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5dd5107518dc70737e9e52b02a1d369a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Antonio's Blog</title>
		<link>http://agoncal.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://agoncal.wordpress.com/osd.xml" title="Antonio&#8217;s Blog" />
		<item>
		<title>O Application Servers, Where Art Thou?</title>
		<link>http://agoncal.wordpress.com/2009/12/12/o-application-servers-where-art-thou/</link>
		<comments>http://agoncal.wordpress.com/2009/12/12/o-application-servers-where-art-thou/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 15:33:43 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[app server]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[weblogic]]></category>
		<category><![CDATA[websphere]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=523</guid>
		<description><![CDATA[With Java EE 6 and GlassFish v3 out, it is time to take a little break and look at the application server world. J2EE 1.2 was created in 1999, that&#8217;s 10 years ago. The application server market at the time was completely different of the one today. There was Weblogic and Websphere, other proprietary application [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=523&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>With <a href="http://jcp.org/en/jsr/summary?id=316">Java EE 6</a> and <a href="https://glassfish.dev.java.net/">GlassFish v3</a> out, it is time to take a little break and look at the application server world. J2EE 1.2 was created in 1999, that&#8217;s 10 years ago. The application server market at the time was completely different of the one today. There was Weblogic and Websphere, other proprietary application servers (not following J2EE) and no open source application server. Today, it is a completely different story.</p>
<p>The application servers&#8217; world has changed so much in the last 10 years, but people still have in mind the heavyweight server that takes huge amount of RAM, disk space and takes ages to start (being completely useless for agile developers who need to test and code quickly and often). So let&#8217;s focus on some application servers  (Geronimo, GlassFish, JBoss, Jetty, JOnAS, Resin, Tomcat, Weblogic and Webspere) and check some parameters.</p>
<h2>The benchmark</h2>
<p><em>Disclaimer :This is not a real benchmark !</em></p>
<p>In this little test I&#8217;m just concerned about the usability of an application server for a developer. The idea is to download it, install it, start it and take some measurements (size of download, ease of installation, size of disk, startup time, size of RAM&#8230;). That&#8217;s all. No deployment of an application, no fancy twists to gain performance&#8230;. Because some of these application servers are resource consuming, I&#8217;m doing all my tests on a Windows XP virtual machine (running on <a href="http://www.virtualbox.org/">Virtual Box</a> 3.1). It is a fresh install of Windows XP sp3 with 1Gb of RAM and not too many software installed (I had to install <a href="http://www.avast.com">Avast</a> but). So when I boot there are 27 processes running and using 230 Mb of RAM (leaving 770 Mb free). Virtualizing can be slower, so keep in mind that startup time can be a bit faster that what I&#8217;m giving you here. I use <a href="http://java.sun.com/javase/">JDK 1.6.0_17</a> (when it&#8217;s not bundled with the server). No optimization at all is made (I haven&#8217;t twisted the JVM, or antyhing application server parameter, everything comes out of the box).</p>
<p>To calculate the <strong>startup time</strong>, I don&#8217;t do any fancy rocket science either. I just start the server a few times, check how long it takes and use the best startup time. Also remember that some servers do not load any container at startup, making them very fast to start. Others load everything (making them slower). Again, I have to point out that I&#8217;m not deploying an application, so it&#8217;s really starting up the server from a fresh install. To calculate the <strong>memory footprint</strong>, I just use the Windows task manager and check the size of the java.exe process.</p>
<p><em>Disclaimer bis : </em>Some of these servers were completely unknown for me, so I might not have been completely accurate. Feel free to leave a comment.</p>
<p><em>Disclaimer Ter</em> : And again, this is not a real benchmark, so don&#8217;t use it to sale any product to your customer ;o) I just wanted to give an overview of most application servers and some numbers.</p>
<h2>Geronimo</h2>
<p><a href="http://geronimo.apache.org/">Geronimo</a> is the Apache Java EE 5 application server.</p>
<h3>Geronimo 2.x</h3>
<p>Geronimo 2.x comes with two flavours : one bundle with Jetty, the other one with Tomcat (the one I&#8217;ve picked up).</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>2.1.4</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.apache.org/">Apache</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>ASL</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://cwiki.apache.org/GMOxDOC21/">Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://mirror.mkhelif.fr/apache/geronimo/2.1.4/geronimo-tomcat6-javaee5-2.1.4-bin.zip">Zip file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>73.5 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>101 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %GERONIMO_HOME%\bin\geronimo start</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%GERONIMO_HOME%\var\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>17.6 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>118.8 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Admin console</td>
<td>http://localhost:8080/console/portal/Welcome (*)</td>
</tr>
</tbody>
</table>
<p>(*) user : system / pwd : manager</p>
<h2>GlassFish</h2>
<p><a href="https://glassfish.dev.java.net">GlassFish</a> is the open source reference implementation of the last Java EE specifications.</p>
<h3>GlassFish 2.x</h3>
<p>GlassFish v2 is the reference implementation of Java EE 5.</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>2.1.1-b31g</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.sun.com">Sun</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Dual license CDDL and GPL</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://docs.sun.com/app/docs/coll/1343.11">Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://java.net/download/javaee5/v2.1.1_branch/promoted/WINNT/glassfish-installer-v2.1.1-b31g-windows.jar">Jar file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>62.9 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>First java -Xmx256m -jar filename.jar and then ant -f setup.xml</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>128 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %GLASSFISH_HOME%\bin\asadmin start-domain</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%GLASSFISH_HOME%\domains\domain1\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>12 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>96.3 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Admin console</td>
<td>http://localhost:4848</td>
</tr>
</tbody>
</table>
<h3>GlassFish 3.x</h3>
<p>GlassFish v3 is the reference implementation of Java EE 6.</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>3.0</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 6</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.sun.com">Sun</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Dual license CDDL and GPL</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://docs.sun.com/app/docs/coll/1343.9">Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://download.java.net/glassfish/v3/release/glassfish-v3.zip">Zipfile</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>73.6 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>90.4 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %GLASSFISH_HOME%\bin\asadmin start-domain</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%GLASSFISH_HOME%\domains\domain1\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>5.6 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>76.2 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Admin console</td>
<td>http://localhost:4848</td>
</tr>
</tbody>
</table>
<h2>JBoss</h2>
<p><a href="www.jboss.org">JBoss</a> is the RedHat open source application server.</p>
<h3>JBoss 5.x</h3>
<p>JBoss 5 is a Java EE 5 application server</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>5.1.0-GA-jdk6</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.jboss.org">JBoss/RedHat</a></td>
</tr>
<tr>
<td>Open source?</td>
<td></td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://www.jboss.org">Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download">Zip file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>127 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>151 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %JBOSS_HOME%\bin\run (*)</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%JBOSS_HOME%\server\default\log</td>
</tr>
<tr>
<td>Best startup time</td>
<td>1m 17 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>242.7 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>JMX console</td>
<td>http://localhost:8080/jmx-console/</td>
</tr>
</tbody>
</table>
<p>(*) That&#8217;s using the default domain</p>
<h3>JBoss 6.x</h3>
<p>JBoss is still a work in progress. It will eventually implement Java EE 6.</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>6.0.0-M1</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 6</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.jboss.org">JBoss/RedHat</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Dual license CDDL and GPL</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="www.jboss.org">Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-6.0.0.M1/jboss-6.0.0.M1.zip/download">Zipfile</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>154 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>180 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %JBOSS_HOME%\bin\run</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%JBOSS_HOME%\server\default\log</td>
</tr>
<tr>
<td>Best startup time</td>
<td>59.7 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>225.2 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>JMX console</td>
<td>http://localhost:8080/jmx-console/</td>
</tr>
</tbody>
</table>
<h2>Jetty</h2>
<p><a href="http://jetty.mortbay.org/jetty/">Jetty</a> provides an HTTP server, HTTP client, and a <a href="http://jcp.org/en/jsr/detail?id=154">Servlet </a> container.</p>
<h3>Jetty 6.x</h3>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>6.1.22</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Servlet 2.5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.intalio.com/">Intalio</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Yes with Apache License 2.0 (*)</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://docs.codehaus.org/display/JETTY/Jetty+Documentation">Jetty Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://dist.codehaus.org/jetty/jetty-6.1.22/jetty-6.1.22.zip">Zip file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>24.3 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip the file</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>69.3 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %JETTY_HOME%\java -jar start.jar</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%JETTY_HOME%\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>7.1 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>26.8 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Snoop page</td>
<td>http://localhost:8080/test</td>
</tr>
</tbody>
</table>
<h3>Jetty 7.x</h3>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>7.0.1</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>A servlet 3.0 container</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.intalio.com/">Intalio</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Dual licensing</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://wiki.eclipse.org/Jetty/">Jetty Wiki</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://www.eclipse.org/downloads/download.php?file=/jetty/7.0.1.v20091125/dist/jetty-distribution-7.0.1.v20091125.zip">Zip file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>2.2 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip the file</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>2.8 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %JETTY_HOME%\java -jar start.jar</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%JETTY_HOME%\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>1240 ms</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>26.9 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
</tbody>
</table>
<h2>JOnAS</h2>
<p><a href="http://wiki.jonas.ow2.org/xwiki/bin/view/Main/WebHome">JOnAS</a> is an application server part of the <a href="http://www.ow2.org/">OW2</a> development community.</p>
<h3>JOnAS 5.1.1</h3>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>5.1.1</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.ow2.org/">OW2</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>LGPL</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://jonas.ow2.org/JONAS_5_1_1/doc/doc-en/html/index.html">JOnAS Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://download.forge.objectweb.org/jonas/jonas-full-5.1.1-bin.zip">Zip file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>134 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip the file</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>148 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %JONAS_HOME%\bin\jonas start</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%JONAS_HOME%\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>15.3 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>73.6 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:9000/</td>
</tr>
<tr>
<td>Admin page</td>
<td>http://localhost:9000/jonasAdmin</td>
</tr>
</tbody>
</table>
<h2>Resin</h2>
<p><a href="http://www.caucho.com/projects/resin/">Resin</a> provides an HTTP server, HTTP client, and a <a href="http://jcp.org/en/jsr/detail?id=154">javax.servlet 2.5 </a> container.</p>
<h3>Resin 3.x</h3>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>3.1.9</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Servlet 2.5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.caucho.com">Caucho</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Yes with GPL License</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://caucho.com/resin-3.1/doc/">Documentation Index</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://www.caucho.com/download/resin-3.1.9.zip">Zip core</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>9.9 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip the file</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>26.6 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %RESIN_HOME%\httpd.exe</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%RESIN_HOME%\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>1752 ms</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>There are 3 processes : httpd (2.8 Mb), a console to start/stop (48Mb), a process (24.3Mb)</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Admin console</td>
<td>http://localhost:8080/resin-admin/</td>
</tr>
</tbody>
</table>
<h3>Resin 4.x</h3>
<p>Resim 4.x is still in development. It implements the Java EE 6 Web Profile.</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>4.0.2</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 6 Web Profile</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.caucho.com">Caucho</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Yes with GPL License</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://caucho.com/resin/doc/">Documentation Index</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://www.caucho.com/download/resin-4.0.2.zip">Zip core</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>16.9 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip the file</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>28.2 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %RESIN_HOME%\resin.exe console</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%RESIN_HOME%\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>1640 ms</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>49 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Admin console</td>
<td>http://localhost:8080/resin-admin/</td>
</tr>
</tbody>
</table>
<h2>Tomcat</h2>
<p><a href="http://tomcat.apache.org/">Apache Tomcat</a> is an open source software implementation of the <a href="http://jcp.org/en/jsr/detail?id=154">Servlet</a> specification. So we can say it&#8217;s a web container that servers Servlets and JSPs.</p>
<h3>Tomcat 6.x</h3>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>6.0.20</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Servlet 2.5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.apache.org/">Apache</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>Yes with Apache Software License</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://tomcat.apache.org/tomcat-6.0-doc/index.html">Documentation Index</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://apache.crihan.fr/dist/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.zip">Zip core</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>6.1 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip the file</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>9.8 Mb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %TOMCAT_HOME%\bin\startup.bat</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%TOMCAT_HOME%\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>591 ms</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>23.3 Mb</td>
</tr>
<tr>
<td>Welcome page</td>
<td>http://localhost:8080/</td>
</tr>
<tr>
<td>Admin console (*)</td>
<td>http://localhost:8080/manager/html</td>
</tr>
</tbody>
</table>
<p>(*) To be able to log on to the admin console, you need to change the <tt>%TOMCAT_HOME%\conf\tomcat-users.xml</tt> configuration files and add a manager role.</p>
<h2>Weblogic</h2>
<p>Oracle Weblogic server belonged once to BEA and is a Java EE 5 application server.</p>
<h3>Weblogic 10.x</h3>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>11g Rel 1 (10.3.2)</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.oracle.com">Oracle</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>No, commercial product</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://download.oracle.com/docs/cd/E15523_01/wls.htm">Weblogic Server Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://www.oracle.com/technology/software/products/middleware/index.html">Installer</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>The installer is only 42 Mb. But the total downloaded is 738 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Run the installer wizard with the Typical install type</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>1.2 Gb</td>
</tr>
<tr>
<td>How to start it</td>
<td>You need to create a domain with the wizard.<br />
Then run %WEBLOGIC_HOME%\user_projects\domains\base_domain\bin\startWebLogic.cmd</td>
</tr>
<tr>
<td>JDK bundled</td>
<td>1.6.0_14</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%WEBLOGIC_HOME%\user_projects\domains\base_domain\servers\AdminServer\logs</td>
</tr>
<tr>
<td>Best startup time</td>
<td>9 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>126.2 Mb</td>
</tr>
<tr>
<td>Admin console</td>
<td>http://localhost:7001/console</td>
</tr>
</tbody>
</table>
<h2>Websphere</h2>
<h3>Websphere 7.x</h3>
<p>Websphere 7 is the Java EE 5 application server of IBM.</p>
<table border="1">
<tbody>
<tr>
<td>Version</td>
<td>7</td>
</tr>
<tr>
<td>What do you get ?</td>
<td>Java EE 5</td>
</tr>
<tr>
<td>Who is behind?</td>
<td><a href="http://www.ibm.com/">IBM</a></td>
</tr>
<tr>
<td>Open source?</td>
<td>No, commercial product</td>
</tr>
<tr>
<td>Documentation</td>
<td><a href="http://www-01.ibm.com/software/webservers/appserv/was/library/#Product%20documentation">Documentation</a></td>
</tr>
<tr>
<td>Download</td>
<td><a href="http://www.ibm.com/developerworks/downloads/ws/was/ be ready to fill many forms and click on many links">Zip file</a></td>
</tr>
<tr>
<td>Size of the downloaded file</td>
<td>838 Mb</td>
</tr>
<tr>
<td>Installation mode</td>
<td>Unzip + Wizard install (with all the defaults)</td>
</tr>
<tr>
<td>Size once installed on drive</td>
<td>1.16 Gb</td>
</tr>
<tr>
<td>How to start it</td>
<td>Execute %WEBSPHERE_HOME%\AppServer\profiles\AppSrv01\bin\startServer.bat server1 -profileName AppSrv01</td>
</tr>
<tr>
<td>Location of log files</td>
<td>%WEBSPHERE_HOME%\AppServer\profiles\AppSrv01\logs\server1</td>
</tr>
<tr>
<td>Best startup time</td>
<td>47.2 s</td>
</tr>
<tr>
<td>Size of the process in RAM at startup</td>
<td>133 Mb</td>
</tr>
<tr>
<td>Admin console</td>
<td>https://localhost:9043/ibm/console</td>
</tr>
</tbody>
</table>
<h2>Conclusion</h2>
<p>There is not a real conclusion that you can take out of these tests, just some hints and numbers to show you that things are moving. Comparing Websphere with Tomcat is like comparing apples with bananas. Of course Tomcat is way faster and lighter than Websphere, but it doesn&#8217;t do the same thing. Also some application servers are minimalist and only come with application containers. On the other hand, other come with integrated portals and so on. So, of course, the startup time is different.</p>
<p>All that to say that the figures of the table below have to be taken with respect of what the application server does (remember that Tomcat and Jetty are just servlet containers). <span style="color:#ff0000;">In red the less efficient</span>, <span style="color:#ff9900;">in orange the second less efficient</span>, <span style="color:#339966;">in green the most efficient</span>, <span style="color:#3366ff;">in blue the second most efficient</span>.</p>
<table border="1">
<tbody>
<tr>
<td>App server</td>
<td>What you get</td>
<td>Size on drive</td>
<td>Startup time</td>
<td>Process size</td>
</tr>
<tr>
<td>Geronimo 2.x</td>
<td>Java EE 5</td>
<td>101 Mb</td>
<td>17.6 s</td>
<td>118.8 Mb</td>
</tr>
<tr>
<td>GlassFish 2.x</td>
<td>Java EE 5</td>
<td>128 Mb</td>
<td>12 s</td>
<td>96.3 Mb</td>
</tr>
<tr>
<td>GlassFish 3.x</td>
<td>Java EE 6</td>
<td>90.4 Mb</td>
<td>5.6 s</td>
<td>76.2 Mb</td>
</tr>
<tr>
<td>JBoss 5.x</td>
<td>Java EE 5</td>
<td>151 Mb</td>
<td><span style="color:#ff0000;">1m 17 s</span></td>
<td><span style="color:#ff0000;">242.7 Mb</span></td>
</tr>
<tr>
<td>JBoss 6.x</td>
<td>Java EE 6</td>
<td>180 Mb</td>
<td>59.7 s</td>
<td><span style="color:#ff6600;">225.2 Mb</span></td>
</tr>
</tbody>
<tbody>
<tr>
<td>Jetty 6.x</td>
<td>Servlet 2.5</td>
<td>69.3 Mb</td>
<td>7.1 s</td>
<td><span style="color:#3366ff;">26.8 Mb</span></td>
</tr>
<tr>
<td>Jetty 7.x</td>
<td>Servlet 3.0</td>
<td><span style="color:#339966;">2.8 Mb</span></td>
<td><span style="color:#3366ff;">1240 ms</span></td>
<td>26.9 Mb</td>
</tr>
<tr>
<td>JOnAS 5.x</td>
<td>Java EE 5</td>
<td>148 Mb</td>
<td>15.3 s</td>
<td>73.6 Mb</td>
</tr>
<tr>
<td>Resin 3.x</td>
<td>Servlet 2.5</td>
<td>26.6 Mb</td>
<td>1752 ms</td>
<td>75.1 Mb</td>
</tr>
<tr>
<td>Resin 4.x</td>
<td>Java EE 6 Web Profile</td>
<td>28.2 Mb</td>
<td>1640 ms</td>
<td>49 Mb</td>
</tr>
<tr>
<td>Tomcat 6.x</td>
<td>Servlet 2.5</td>
<td><span style="color:#3366ff;">9.8 Mb</span></td>
<td><span style="color:#339966;">591 ms</span></td>
<td><span style="color:#339966;">23.3 Mb</span></td>
</tr>
<tr>
<td>Weblogic 10.x</td>
<td>Java EE 5</td>
<td><span style="color:#ff0000;">1.2 Gb</span></td>
<td>9 s</td>
<td>126.2 Mb</td>
</tr>
<tr>
<td>Websphere 7.x</td>
<td>Java EE 5</td>
<td><span style="color:#ff9900;">1.16 Gb</span></td>
<td><span style="color:#ff9900;">47.2 s</span></td>
<td>133 Mb</td>
</tr>
</tbody>
</table>
<h3>Java EE 5</h3>
<p>If you only concentrate on the Java EE 5 implementation, you&#8217;ll get the sub-table below :</p>
<table border="1">
<tbody>
<tr>
<td>App server</td>
<td>Size on drive</td>
<td>Startup time</td>
<td>Process size</td>
</tr>
<tr>
<td>Geronimo 2.x</td>
<td><span style="color:#339966;">101 Mb</span></td>
<td>17.6 s</td>
<td>118.8 Mb</td>
</tr>
<tr>
<td>GlassFish 2.x</td>
<td><span style="color:#3366ff;">128 Mb</span></td>
<td><span style="color:#3366ff;">12 s</span></td>
<td><span style="color:#3366ff;">96.3 Mb</span></td>
</tr>
<tr>
<td>JBoss 5.x</td>
<td>151 Mb</td>
<td><span style="color:#ff0000;">1m 17 s</span></td>
<td><span style="color:#ff0000;">242.7 Mb</span></td>
</tr>
<tr>
<td>JOnAS 5.x</td>
<td>148 Mb</td>
<td>15.3 s</td>
<td><span style="color:#339966;">73.6 Mb</span></td>
</tr>
<tr>
<td>Weblogic 10.x</td>
<td><span style="color:#ff0000;">1.2 Gb</span></td>
<td><span style="color:#339966;">9 s</span></td>
<td>126.2 Mb</td>
</tr>
<tr>
<td>Websphere 7.x</td>
<td><span style="color:#ff9900;">1.16 Gb</span></td>
<td><span style="color:#ff9900;">47.2 s</span></td>
<td><span style="color:#ff9900;">133 Mb</span></td>
</tr>
</tbody>
</table>
<p>When you read this table there are things that you would have not expected. For example, JBoss is the slowest server to startup and Weblogic is the fastest. JBoss is also the one that has the biggest memory footprint. Websphere has the second less efficient score of all categories, while GlassFish has the second most efficient scores. JOnAS, on the other hand, has the smallest memory footprint.</p>
<p>Again, I haven&#8217;t deployed any application, used the administration console extensively, created clusters and did any fancy performance tests. But I wanted to show you that a full Java EE 5 server can start in 9 seconds or can only take 73 Mb or RAM. With Java EE 6 coming and the Web Profile, application servers have to become more modular and carry less weight. GlassFish v3 is a good example as it starts up in only 5.6 seconds and Resin 4 in 1640 ms. Application servers today are not the same that when they were created 10 years ago. Things have changed : Java EE 6 has become lighter, and so are the application servers.</p>
<p><em>PS : If I have omitted an application server that you (and I) think is important,  let me know and I&#8217;ll give it a try and add it to the list. If you have any information to report, feel free to leave a comment.</em></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/523/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=523&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/12/12/o-application-servers-where-art-thou/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>
	</item>
		<item>
		<title>A busy week at Devoxx</title>
		<link>http://agoncal.wordpress.com/2009/11/14/a-busy-week-at-devoxx/</link>
		<comments>http://agoncal.wordpress.com/2009/11/14/a-busy-week-at-devoxx/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 08:43:08 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[java ee 6]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=510</guid>
		<description><![CDATA[If you don&#8217;t already know it, next week is Devoxx : the biggest European Java conference. It&#8217;s my 4th time there and this year I&#8217;ll be doing 2 conferences, 1 BOF and 1 book signing session.

Tuesday, from 9:30 to 12:30 : University talk The Java EE 6 Platform.  I&#8217;ll be doing a 3 hours talk [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=510&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>If you don&#8217;t already know it, next week is <a href="http://www.devoxx.com">Devoxx</a> : the biggest European Java conference. It&#8217;s my 4th time there and this year <a href="http://www.devoxx.com/display/DV09/Antonio+Goncalves">I&#8217;ll be doing</a> 2 conferences, 1 BOF and 1 book signing session.</p>
<ul>
<li>Tuesday, from 9:30 to 12:30 : University talk <strong><a href="http://www.devoxx.com/display/DV09/Uni+Day+2">The Java EE 6 Platform</a></strong>.  I&#8217;ll be doing a 3 hours talk with <a href="http://www.devoxx.com/display/DV09/Alexis+Moussine-Pouchkine">Alexis Moussine-Pouchkine</a> with plenty of demos. We will gradually develop a web application using most of the EE specifications (Managed Bean 1.0, JPA 2.0, Servlet 3.0, EJB 3.1, JSF 2.0, Bean Validation 1.0 and JAX-RS 1.1)</li>
<li>Tuesday, from 7pm to 8pm : BOF <strong><a href="http://www.devoxx.com/pages/viewpage.action?pageId=2753434">Why Should I Care About Java EE 6 ?</a></strong>. If you&#8217;ve attended the university talk or if you just want to talk about Java EE 6, come to this BOF. With Alexis we will be sharing this BOF with <a href="http://www.devoxx.com/display/DV09/Paul+Sandoz">Paul Sandoz</a>, <a href="http://www.devoxx.com/display/DV09/Roberto+Chinnici">Roberto Chinnici</a>, <a href="http://www.devoxx.com/display/DV09/Ludovic+Champenois">Ludovic Champenois</a> and <a href="http://www.devoxx.com/display/DV09/Emmanuel+Bernard">Emmanuel Bernard</a>.</li>
<li>Wednesday, from 3:10 to 4:10 : Conference talk <strong><a href="http://www.devoxx.com/display/DV09/Conf+Day+1">What&#8217;s new in Java EE 6 ?</a></strong>. This one hour talk is for people who already know Java EE 5 and want to discover what&#8217;s new in EE 6. I&#8217;m proud to say that I&#8217;ll be talking in room number 8 (the biggest) just after <a href="http://www.devoxx.com/display/DV09/James+Gosling">James Gosling</a>. Cool !</li>
<li>Wednesday, from 4:10 to 4:40 : <strong>Book signing session</strong>. If you want to know more about Java EE 6 and get a copy of <a href="http://www.antoniogoncalves.org/xwiki/bin/view/Book/JavaEE6">your book</a> signed, let&#8217;s meet in the ground floor at the book store.</li>
</ul>
<p>And because Devoxx is full of things to do, Tuesday night is the <strong>speakers&#8217; diner</strong> (that&#8217;s always nice), Wednesday the <strong><a href="http://www.devoxx.com/display/DV09/Java+User+Group+BOF">JUG Leaders&#8217; BOF</a></strong> (with James Gosling as a guest star) and Thursday, with my friends Emmanuel Bernard, Guillaume Laforge and some specials guests, we will record our famous <strong><a href="http://lescastcodeurs.com/">Cast Codeurs</a></strong> podcast.</p>
<p>And, of course, Devoxx is mostly about meeting people and attend conferences. See you there.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/510/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/510/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/510/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/510/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/510/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/510/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/510/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/510/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/510/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/510/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=510&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/11/14/a-busy-week-at-devoxx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>
	</item>
		<item>
		<title>Mapping and querying a list of primitive types with JPA 2.0</title>
		<link>http://agoncal.wordpress.com/2009/11/01/mapping-and-querying-a-list-of-primitive-types-with-jpa-2-0/</link>
		<comments>http://agoncal.wordpress.com/2009/11/01/mapping-and-querying-a-list-of-primitive-types-with-jpa-2-0/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 19:38:22 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jpa 2.0]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=500</guid>
		<description><![CDATA[Sometimes you just want to map a list of primitive types. For example, a Book has a list of tags and tags are just strings. So you want to do the following :
@Entity
public class Book {

  @Id
  @GeneratedValue
  private Long id;
  private String title;
  private Float price;
  private String [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=500&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Sometimes you just want to map a list of primitive types. For example, a Book has a list of tags and tags are just strings. So you want to do the following :</p>
<pre>@Entity
public class Book {

  @Id
  @GeneratedValue
  private Long id;
  private String title;
  private Float price;
  private String description;
  private String isbn;
  private Integer nbOfPage;
  private List&lt;String&gt; tags = new ArrayList&lt;String&gt;();
  ...
}
</pre>
<p>What happens when you do this with JPA 1.0 ? The List implements serializable so the entire List object gets serialized into a blob column. What are the other choices ? Well, because JPA maps entities, you can create a Tag entity (with an ID and a value) and have a list of tags :</p>
<pre>@Entity
public class Book {

  @Id
  @GeneratedValue
  private Long id;
  ...
  private List&lt;Tag&gt; tags = new ArrayList&lt;Tag&gt;();
  ...
}

@Entity
public class Tag{

  @Id
  @GeneratedValue
  private Long id;
  private String value;
  ...
}
</pre>
<p>That&#8217;s a shame to create a seperate entity when what you want is just a String. Now with JPA 2.0 you can use the @ElementCollection annotation on a list :</p>
<pre>@Entity
public class Book {

  @Id
  @GeneratedValue
  private Long id;
  ...
  @ElementCollection
  @CollectionTable(name ="tags")
  private List&lt;String&gt; tags = new ArrayList&lt;String&gt;();
  ...
}
</pre>
<p><img class="alignright size-full wp-image-502" title="jpa2" src="http://agoncal.files.wordpress.com/2009/11/jpa2.png?w=199&#038;h=230" alt="jpa2" width="199" height="230" />The @ElementCollection annotation will automatically map the list of strings into a table named BOOK_TAGS (&lt;name of the entity&gt;_&lt;name of the attribute&gt;). If you need to change the table&#8217;s name, just use the @CollectionTable annotation. The result is shown on the figure. The Book table contains all the Book attributes, and the TAGS table contains the BOOK_ID foreign key and the value of the tags.</p>
<p>If you then want to find all the books that have the tag &#8217;scifi&#8217;, you can just write the following JPQL query :</p>
<p>SELECT b FROM Book b WHERE b.tags = &#8217;scifi&#8217;</p>
<p><a href="http://www.antoniogoncalves.org/xwiki/bin/download/Main/Attach/ElementCollection.rar">Download the code of this example</a>. It uses EclipseLink 2.0-M9 and the Derby database.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/500/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=500&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/11/01/mapping-and-querying-a-list-of-primitive-types-with-jpa-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/11/jpa2.png" medium="image">
			<media:title type="html">jpa2</media:title>
		</media:content>
	</item>
		<item>
		<title>Because I always forget how to use maven-ear-plugin</title>
		<link>http://agoncal.wordpress.com/2009/10/23/because-i-always-forget-how-to-use-maven-ear-plugin/</link>
		<comments>http://agoncal.wordpress.com/2009/10/23/because-i-always-forget-how-to-use-maven-ear-plugin/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 22:26:59 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=478</guid>
		<description><![CDATA[Sometimes you write a blog to express an idea, to ask some feedback from the community, to share a very nice trick&#8230; or because you always forget something and want to write it down so you can remember later on. That&#8217;s the reason of this post. I never remember how to use the maven-ear-plugin, so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=478&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Sometimes you write a blog to express an idea, to ask some feedback from the community, to share a very nice trick&#8230; or because you always forget something and want to write it down so you can remember later on. That&#8217;s the reason of this post. I never remember how to use the <a href="http://maven.apache.org/plugins/maven-ear-plugin/">maven-ear-plugin</a>, so I&#8217;m writing it down. There is something funny with Maven and I. I spend hours trying to figure out to do something with Maven, and then, I automatically forget it. That&#8217;s the beauty of human&#8217;s brain : it doesn&#8217;t hold junk information for long.</p>
<p>Let&#8217;s say you have a project made of a <strong>Web module</strong>, an <strong>EJB module</strong> and external <strong>Lucene libraries</strong>. You then need to package this entire application into a ear file plus a few configuration files (login-config.xml and the application.xml deployment descriptor). With Maven each module is defined into a separate directory with its own pom.xml. So you will end up with the following structure :</p>
<ul>
<li>a root pom.xml</li>
<li>a web module with its own pom.xml</li>
<li>an EJB module with its own pom.xml</li>
<li>an ear module that will be used only to package the entire application</li>
</ul>
<pre><img class="aligncenter size-full wp-image-482" title="maven-ear" src="http://agoncal.files.wordpress.com/2009/10/maven-ear.png?w=216&#038;h=279" alt="maven-ear" width="216" height="279" /></pre>
<p>I will not define what&#8217;s in the pom.xml of the web and EJB module, but only the interesting part : the pom.xml of the ear module, that&#8217;s where you define the maven-ear-plugin :</p>
<ul>
<li> The first part of the pom.xml is quite normal, nothing special except the packaging that is set to ear (&lt;packaging&gt;ear&lt;packaging&gt;).</li>
<li>Then you have the dependencies. Here you define the web and EJB modules as well as the Lucene libraries. Note that it&#8217;s very important to specify &lt;type&gt;war&lt;/type&gt; for the web module. If you don&#8217;t Maven will look for a jar file.</li>
<li>Then comes the definition and configuration of the maven-ear-plugin. Notice that I redefine the artifacts that depend on the application but I add the extra information of the module : &lt;webModule&gt;, &lt;ejbModule&gt; or &lt;jarModule&gt;. Also note that I&#8217;ve decided to package the Lucene libraries into a subdirectory called lucenelib.</li>
</ul>
<pre>&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;org.example.mvnearplg&lt;/groupId&gt;
  &lt;artifactId&gt;ear&lt;/artifactId&gt;
  &lt;packaging&gt;ear&lt;/packaging&gt;
  &lt;version&gt;1.0&lt;/version&gt;

  &lt;parent&gt;
    &lt;groupId&gt;org.example&lt;/groupId&gt;
    &lt;artifactId&gt;mvnearplg&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
  &lt;/parent&gt;

  &lt;dependencies&gt;
    &lt;!-- web and ejb modules --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.example.mvnearplg&lt;/groupId&gt;
      &lt;artifactId&gt;ejb&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;type&gt;ejb&lt;/type&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.example.mvnearplg&lt;/groupId&gt;
      &lt;artifactId&gt;web&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;type&gt;war&lt;/type&gt;
    &lt;/dependency&gt;
    &lt;!-- external lucene libraries --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;
      &lt;artifactId&gt;lucene-highlighter&lt;/artifactId&gt;
      &lt;version&gt;2.4.1&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;
      &lt;artifactId&gt;lucene-core&lt;/artifactId&gt;
      &lt;version&gt;2.4.1&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-ear-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.3.2&lt;/version&gt;
        &lt;!-- configuring the ear plugin --&gt;
        &lt;configuration&gt;
          &lt;modules&gt;
            &lt;webModule&gt;
              &lt;groupId&gt;org.example.mvnearplg&lt;/groupId&gt;
              &lt;artifactId&gt;web&lt;/artifactId&gt;
            &lt;/webModule&gt;
            &lt;ejbModule&gt;
              &lt;groupId&gt;org.example.mvnearplg&lt;/groupId&gt;
              &lt;artifactId&gt;ejb&lt;/artifactId&gt;
            &lt;/ejbModule&gt;
            &lt;!--extra lucene libs into lucenelib directory --&gt;
            &lt;jarModule&gt;
              &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;
              &lt;artifactId&gt;lucene-highlighter&lt;/artifactId&gt;
              &lt;bundleDir&gt;lucenlib&lt;/bundleDir&gt;
            &lt;/jarModule&gt;
            &lt;jarModule&gt;
              &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;
              &lt;artifactId&gt;lucene-core&lt;/artifactId&gt;
              &lt;bundleDir&gt;lucenelib&lt;/bundleDir&gt;
            &lt;/jarModule&gt;
          &lt;/modules&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;</pre>
<p>The ear plugin looks for its resources under the src/main/application directory. That&#8217;s where you typically put your META-INF directory with the application.xml file and some extra descriptors. So the result is that :</p>
<ul>
<li>The external Lucene libraries are under the lucenelib directory (that&#8217;s because I&#8217;ve specified the &lt;bundleDir&gt;, otherwise they would have been under the root directory)</li>
<li>The META-INF/application.xml and the /login-config.xml files are automatically packaged in the ear file (that&#8217;s because they were under the default resource directory src/main/application).</li>
<li>The ejb module (ejb-1.0.jar) and web module (web-1.0.war) are located under the root directory</li>
</ul>
<p><img class="aligncenter size-full wp-image-490" title="maven-ear-done" src="http://agoncal.files.wordpress.com/2009/10/maven-ear-done.png?w=221&#038;h=165" alt="maven-ear-done" width="221" height="165" /></p>
<p>Next time I&#8217;ll need the ear plugin I&#8217;ll remember to read my own post.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/478/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=478&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/10/23/because-i-always-forget-how-to-use-maven-ear-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/10/maven-ear.png" medium="image">
			<media:title type="html">maven-ear</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/10/maven-ear-done.png" medium="image">
			<media:title type="html">maven-ear-done</media:title>
		</media:content>
	</item>
		<item>
		<title>Java EE 6 is touring French JUGs</title>
		<link>http://agoncal.wordpress.com/2009/10/11/java-ee-6-is-touring-french-jugs/</link>
		<comments>http://agoncal.wordpress.com/2009/10/11/java-ee-6-is-touring-french-jugs/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 18:25:50 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java ee 6]]></category>
		<category><![CDATA[jug]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=466</guid>
		<description><![CDATA[One beauty of living in a country with nearly 20 Java User Groups is that you can travel around while talking about your favourite topics. For me, at the moment, it&#8217;s Java EE 6 (thanks to my book). So last week I was invited to the Riviera JUG to give a talk about the new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=466&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>One beauty of living in a country with nearly 20 Java User Groups is that you can travel around while talking about your favourite topics. For me, at the moment, it&#8217;s <strong>Java EE 6</strong> (thanks to my <a href="http://www.antoniogoncalves.org/xwiki/bin/view/Book/JavaEE6">book</a>). So last week I was invited to the <a href="http://www.rivierajug.org">Riviera JUG</a> to give a talk about the new features of EE 6. As you can see on the photo below, even if it was a sunny day by the beach, nearly 90 people turned up.</p>
<p><img class="aligncenter size-full wp-image-467" title="rivieraijug1w400" src="http://agoncal.files.wordpress.com/2009/10/rivieraijug1w400.jpg?w=400&#038;h=134" alt="rivieraijug1w400" width="400" height="134" /></p>
<p>Unfortunately I didn&#8217;t have much time to profit from the beach of Nice. Well, guess what ? On Thursday I&#8217;ll be talking at the <a href="http://www.bordeauxjug.org/20091015_JavaEE6">Bordeaux JUG</a> (and thus having some red wine during the talk) which celebrates its first anniversary. And the week after, at the <a href="http://www.lyonjug.org/bin/view/Main/20091020">Lyon JUG</a> giving a talk on the same topic. November I will concentrate on <a href="http://www.devoxx.com"> Devoxx</a> where I&#8217;ll be doing a 3 hours university talk with <a href="http://blogs.sun.com/alexismp">Alexis Moussine-Pouchkine</a> and a one hour conference talk. And back to French JUGs on the 7th of December at the <a href="http://www.breizhjug.org/">Breizh JUG</a> for a Java Ee 6 presentation.</p>
<p>I&#8217;ll finish this year back to my home town JUG. I&#8217;m glad to announce that with <a href="http://www.parisjug.org/xwiki/bin/view/Speaker/IsvyMichael">Michaël Isvy</a> we&#8217;ll be doing a Java EE 6 vs Spring 3.0 talk at the <a href="http://www.parisjug.org">Paris JUG</a> on the 8th of december.</p>
<p>A busy EE 6 year and I already have plans to tour other French JUGs in 2010.</p>
<p><img class="aligncenter size-full wp-image-469" title="rivierajug-w400" src="http://agoncal.files.wordpress.com/2009/10/rivierajug-w400.jpg?w=400&#038;h=267" alt="rivierajug-w400" width="400" height="267" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/466/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=466&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/10/11/java-ee-6-is-touring-french-jugs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/10/rivieraijug1w400.jpg" medium="image">
			<media:title type="html">rivieraijug1w400</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/10/rivierajug-w400.jpg" medium="image">
			<media:title type="html">rivierajug-w400</media:title>
		</media:content>
	</item>
		<item>
		<title>Are students getting brainwashed to become project managers ?</title>
		<link>http://agoncal.wordpress.com/2009/09/20/are-students-getting-brainwashed-to-become-project-managers/</link>
		<comments>http://agoncal.wordpress.com/2009/09/20/are-students-getting-brainwashed-to-become-project-managers/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 18:52:27 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=440</guid>
		<description><![CDATA[As we all know, the percentage of IT projects that succeed is very low, and this post doesn&#8217;t have the pretension to explain you why. The reasons are multiple and complex. But there is one that we all know about and live on our day to day jobs : IT projects are mostly made of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=440&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>As we all know, the percentage of IT projects that succeed is very low, and this post doesn&#8217;t have the pretension to explain you why. The reasons are multiple and complex. But there is one that we all know about and live on our day to day jobs : IT projects are mostly made of junior developers and tons of unexperienced managers. Well, at least in France, but I know other countries that follow the same pattern. Here, code is bad. So if you turn 30 and you are still spending 8 hours a day in front of your IDE it&#8217;s because there&#8217;s something wrong with you. And, of course, your salary will not increase as development is not seen as a valuable job. So, what do you need to do ? Become a project manager of course. You will get a pay rise&#8230; and a gorgeous girlfriend. What ? You don&#8217;t believe me ?</p>
<p>The other day I went to a IT university (I&#8217;m not mentioning the name here) and this is what I could see on the walls :</p>
<p><img class="aligncenter size-full wp-image-441" title="Become a manager" src="http://agoncal.files.wordpress.com/2009/09/manager1-w400.jpg?w=400&#038;h=300" alt="Become a manager" width="400" height="300" /></p>
<p>This one says <em>&#8220;pssst&#8230; become a project leader&#8221;</em>. As you can see on the right side, the guy wears a nice tie and his girlfriend looks gorgeous.</p>
<p><img class="aligncenter size-full wp-image-442" title="Become a manager" src="http://agoncal.files.wordpress.com/2009/09/manager2-w400.jpg?w=400&#038;h=300" alt="Become a manager" width="400" height="300" /></p>
<p>This one is better. On the left side is the developer&#8217;s girlfriend and on the right side the manager&#8217;s one (&#8220;<em>become project manager</em>&#8220;). I suppose I don&#8217;t have to explain this one.</p>
<p><img class="aligncenter size-full wp-image-444" title="Become a manager" src="http://agoncal.files.wordpress.com/2009/09/manager3-w4001.jpg?w=400&#038;h=300" alt="Become a manager" width="400" height="300" /></p>
<p>This one says <em>&#8220;Your are the one. You have already made your choice. Become a project leader&#8221;</em>. That reminds you the Matrix of course. So the developer takes the blue pill and the manager the red pill.</p>
<p>I hope these ads haven&#8217;t been made by the teachers themselves but by the students. One way or the other, this is what your are taught at university. So when you are 22/24 years old and you start your first job, you definitely want to pull the nice girls and try to avoid coding as much as you can. 2 years of developing is enough, and when you turn 24/26, you want to manage projects&#8230; and fail miserably but you have the money and the gorgeous cheek.</p>
<p>As I said, this is not the only reason why projects fail, but it&#8217;s one of them. IT industry is one of the few where experience is not rewarded. An experienced lawyer is, an experience accountant also, but a developer should not be more than 30. This is clearly wrong and ads like these ones do not help in solving this cultural problem.</p>
<p>And what about you ? Would you prefer to become a project manager and have a nice girlfriend ?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/440/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=440&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/09/20/are-students-getting-brainwashed-to-become-project-managers/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/09/manager1-w400.jpg" medium="image">
			<media:title type="html">Become a manager</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/09/manager2-w400.jpg" medium="image">
			<media:title type="html">Become a manager</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/09/manager3-w4001.jpg" medium="image">
			<media:title type="html">Become a manager</media:title>
		</media:content>
	</item>
		<item>
		<title>An interview about me, Java EE 6, the JUG, the JCP and some Jazz</title>
		<link>http://agoncal.wordpress.com/2009/08/08/an-interview-about-me-java-ee-6-the-jug-the-jcp-and-some-jazz/</link>
		<comments>http://agoncal.wordpress.com/2009/08/08/an-interview-about-me-java-ee-6-the-jug-the-jcp-and-some-jazz/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 18:32:59 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=436</guid>
		<description><![CDATA[A few weeks ago, Alexis Moussine-Pouchkine asked me for an interview. My book has been out for a couple of month now, Java EE 6 is getting hot, GlassFish V3 is closed to final, the Paris JUG is doing well, I&#8217;ve recently been nominated Java Champion, JSR 299 and 330 are working hand in hand, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=436&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>A few weeks ago, <a href="http://blogs.sun.com/alexismp/">Alexis Moussine-Pouchkine</a> asked me for an interview. My <a href="http://agoncal.wordpress.com/2009/04/26/a-book-about-java-ee-6/">book has been out</a> for a couple of month now, <a href="http://jcp.org/en/jsr/summary?id=316">Java EE 6</a> is getting hot, <a href="https://glassfish.dev.java.net">GlassFish V3</a> is closed to final, the <a href="http://www.parisjug.org">Paris JUG</a> is doing well, I&#8217;ve recently been nominated <a href="http://agoncal.wordpress.com/2009/07/09/i-am-a-champion-my-friends/">Java Champion</a>, <a href="http://agoncal.wordpress.com/2009/05/27/jsr-330/">JSR 299 and 330</a> are working hand in hand, the <a href="http://lescastcodeurs.com">Cast Codeurs</a> podcast is a success, summer and vacations are on their way&#8230; it was time to have a break, a nice lunch with Alexis, a few glasses of wine, and have a chat.</p>
<p>So if you want to know a little bit more about all that, you can <a href="http://blogs.sun.com/glassfishpodcast/entry/episode_036_interview_with_antonio">listen to the podcas</a>t or/and <a href="http://blogs.sun.com/glassfishpodcast/resource/interview_antonio.html">read the transcription</a> of it.</p>
<p><a href="http://blogs.sun.com/glassfishpodcast/entry/episode_036_interview_with_antonio">GlassFish Podcast</a></p>
<p><a href="http://blogs.sun.com/glassfishpodcast/resource/interview_antonio.html">Podcast transcription</a></p>
<p>Thanks Alexis</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/436/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/436/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/436/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=436&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/08/08/an-interview-about-me-java-ee-6-the-jug-the-jcp-and-some-jazz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>
	</item>
		<item>
		<title>I am a champion, my friends</title>
		<link>http://agoncal.wordpress.com/2009/07/09/i-am-a-champion-my-friends/</link>
		<comments>http://agoncal.wordpress.com/2009/07/09/i-am-a-champion-my-friends/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 20:08:25 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[champion]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=424</guid>
		<description><![CDATA[Yes, I am a Java champion my friends, and I&#8217;ll keep on Javaing till the end.
Do you know the Java Champion program ? It was created by Sun to recognize leaders in the Java developer community. The concept is to build an informal but select group of passionate Java technology and community people outside of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=424&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><a href="https://java-champions.dev.java.net/"><img class="alignright size-full wp-image-429" title="Java Champion" src="http://agoncal.files.wordpress.com/2009/07/champion2.jpg?w=130&#038;h=155" alt="Java Champion" width="130" height="155" /></a>Yes, I am a Java champion my friends, and I&#8217;ll keep on Javaing till the end.</p>
<p>Do you know the <a href="https://java-champions.dev.java.net/">Java Champion program</a> ? It was created by Sun to recognize leaders in the Java developer community. The concept is to build an informal but select group of passionate Java technology and community people outside of Sun. As quoted in the <a href="https://java-champions.dev.java.net/#nominations">Java Champions web site</a>, these people can be :</p>
<ul>
<li> Java Luminaries; senior developers; architects; consultants; JCP members; etc</li>
<li> Academics/University Professors</li>
<li> Authors of Java-related content (online &amp; print) and industry conference speakers</li>
<li> Community leaders: Java User Group (JUG) Leaders and the Leaders of online Java portals</li>
</ul>
<p>So as you can see, the Champions program is aimed at community. And the duty of a champion should be :</p>
<blockquote><p>Java Champions would be in a Leadership role.  Champions would focus what they learn from the program back to the java community, spread the knowledge, and positively influence other developers. Steer people to the Java Community for technology problem solving, application development, or just plain &#8220;evangelization&#8221; of what Java can do.</p></blockquote>
<p>So, how did I suddenly become a Champion ? First of all it is not sudden. Champions need to recommend people to become champion. Then, there is a vote within the Champion mailing list and you get voted in or not depending on the result. Last year, Vincent Brabant introduced me to the Champions community, but some members thought it was a bit to soon. I had to show my involvement in the newly created <a href="http://www.parisjug.org">Paris JUG</a>. A year later, Stephan Janssen asked a new vote, and I got accepted.</p>
<p><a href="https://java-champions.dev.java.net/#newchampions">Why me</a> ? Well, to become a Champion you need to fulfil at least 3 of the <a href="https://java-champions.dev.java.net/#the5">5 principles</a>, and these are the principle that I filled :</p>
<p><strong>Principle #1: &#8211; Java Champions are Leaders</strong>. This is due to my involvement in the <a href="http://www.parisjug.org">Paris JUG</a>.</p>
<p><strong>Principle #2: &#8211; Java Champions are Luminaries in their field</strong>. This is mostly due to the work I&#8217;ve been doing with the <a href="http://jcp.org">JCP</a> with Java EE 6 (expert member on JSR-316, 317, 318).</p>
<p><strong>Principle #5: &#8211; Java Champions are able to Evangelize or influence other developers through their own professional activities.</strong> And this one is related to the courses I&#8217;ve been teaching at the Parisian <a href="http://www.cnam.eu/">CNAM university</a>, the two books I wrote (<a href="http://www.antoniogoncalves.org/xwiki/bin/view/Book/">Java EE 5 and Java EE 6</a>), the <a href="http://www.antoniogoncalves.org/xwiki/bin/view/Main/Talks">talks</a> I give at conferences and JUGs, and recently the french podcast <a href="http://lescastcodeurs.com">Les CastCodeurs</a>.</p>
<p>It is an honour to be part of the Java Champions and I  would like to thank them all for voting me in. Particularly Vincent Brabant and Stephan Janssen who proposed my nomination and Aaron who supervises the program. It&#8217;s been great to be part of Java, part of the community, part of the JUG Leaders and now be part of the Champions.</p>
<p>I will keep on the hard work and fill my role of a champion.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/424/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=424&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/07/09/i-am-a-champion-my-friends/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>

		<media:content url="http://agoncal.files.wordpress.com/2009/07/champion2.jpg" medium="image">
			<media:title type="html">Java Champion</media:title>
		</media:content>
	</item>
		<item>
		<title>Derby 10.5.1.1 is really an in-memory database</title>
		<link>http://agoncal.wordpress.com/2009/07/05/derby-10-5-1-1-is-really-an-in-memory-database/</link>
		<comments>http://agoncal.wordpress.com/2009/07/05/derby-10-5-1-1-is-really-an-in-memory-database/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 20:11:00 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[derby]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=417</guid>
		<description><![CDATA[Up to Derby 10.4.2.0, the in-memory database mode wasn&#8217;t a real one because data was stored into files onto your disk. The new 10.5.1.1 supports a real in-memory mode were data is only stored in memory, with no files being created. As stated in the new features page : Initial implementation of a storage engine [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=417&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Up to <a href="http://db.apache.org/derby/">Derby</a> 10.4.2.0, the in-memory database mode wasn&#8217;t a real one because data was stored into files onto your disk. The new <a href="http://db.apache.org/derby/releases/release-10.5.1.1.cgi">10.5.1.1</a> supports a real <a href="http://wiki.apache.org/db-derby/InMemoryBackEndPrimer">in-memory</a> mode were data is only stored in memory, with no files being created. As stated in the <a href="http://db.apache.org/derby/releases/release-10.5.1.1.cgi#New+Features">new features page</a> : <em>Initial implementation of a storage engine for Derby where all data is kept in memory. There is no documentation for this feature. This functionality itself is not yet fully implemented, but users are welcome to experiment with it</em>. So I did test it.</p>
<p>First of all, if you are using Maven, you will be disappointed to know that the 10.5.1.1 release is not in the default <a href="http://repo2.maven.org/maven2/org/apache/derby/derby/">Apache repository</a>. You need to add the following repository to your pom.xml :</p>
<pre>&lt;repository&gt;
  &lt;id&gt;Apache Repo&lt;/id&gt;
  &lt;name&gt;Apache repository for Derby 10.5.1.1&lt;/name&gt;
  &lt;url&gt;http://people.apache.org/repo/m1-ibiblio-rsync-repository&lt;/url&gt;
  &lt;layout&gt;legacy&lt;/layout&gt;
&lt;/repository&gt;</pre>
<p>Then, the JDBC URL has to be changed from <em>jdbc:derby:chapter02DB;create=true </em>to <em>jdbc:derby:<strong>memory</strong>:chapter02DB;create=true</em>.</p>
<p>As a little benchmark, I have an application with 25 test cases using in-memory storage with Derby 10.4.2.0. It took <strong>5 minutes and 53 seconds</strong> to run all the tests. With the new 10.5.1.1 it only took <strong>21 seconds</strong>. Not bad.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/417/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=417&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/07/05/derby-10-5-1-1-is-really-an-in-memory-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>
	</item>
		<item>
		<title>JPA 2.0 : standard properties in persistence.xml</title>
		<link>http://agoncal.wordpress.com/2009/07/05/jpa-2-0-standard-properties-in-persistence-xml/</link>
		<comments>http://agoncal.wordpress.com/2009/07/05/jpa-2-0-standard-properties-in-persistence-xml/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 19:12:39 +0000</pubDate>
		<dc:creator>agoncal</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jpa 2.0]]></category>

		<guid isPermaLink="false">http://agoncal.wordpress.com/?p=407</guid>
		<description><![CDATA[As you might know with JPA, the META-INF/persistence.xml file defines a persistence unit with some provider&#8217;s properties. For example, if you are using JPA in a Java SE environment, you will have to define the JDBC driver, database connexion (user and password), database URL and so forth. In JPA 1.0 these properties were not standard, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=407&subd=agoncal&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>As you might know with JPA, the <em>META-INF/persistence.xml</em> file defines a persistence unit with some provider&#8217;s properties. For example, if you are using JPA in a Java SE environment, you will have to define the JDBC driver, database connexion (user and password), database URL and so forth. In JPA 1.0 these properties were not standard, so for each persistence provider you would have to use proprietary properties. For example, with <a href="http://www.eclipse.org/eclipselink/">EclipseLink</a> this is what you would need to connect to a Derby database :</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"&gt;
  &lt;persistence-unit name="chapter02PU" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
    &lt;class&gt;com.apress.javaee6.chapter02.Book&lt;/class&gt;
    &lt;properties&gt;
      &lt;property name="eclipselink.target-database" value="DERBY"/&gt;
      &lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables"/&gt;
      &lt;property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/&gt;
      &lt;property name="eclipselink.jdbc.url" value="jdbc:derby://localhost:1527/chapter02DB;create=true"/&gt;
      &lt;property name="eclipselink.jdbc.user" value="APP"/&gt;
      &lt;property name="eclipselink.jdbc.password" value="APP"/&gt;
    &lt;/properties&gt;
  &lt;/persistence-unit&gt;
&lt;/persistence&gt;</pre>
<p>As you can see, each property is called eclipselink.<em>something</em>. With the new <a href="http://jcp.org/en/jsr/summary?id=317">JPA 2.0</a> shipping with <a href="http://jcp.org/en/jsr/summary?id=316">Java EE 6</a> in September, some properties have been standardised :</p>
<ul>
<li><em>javax.persistence.jdbc.driver </em>— fully qualified name of the driver class</li>
</ul>
<ul>
<li><em>javax.persistence.jdbc.url </em>— driver-specific URL</li>
</ul>
<ul>
<li><em>javax.persistence.jdbc.user </em>— username used by database connection</li>
</ul>
<ul>
<li><em>javax.persistence.jdbc.password </em>— password for database connection validation</li>
</ul>
<p>If you use the latest build of <a href="http://eclipse.ialto.org/rt/eclipselink/maven.repo/org/eclipse/persistence/org.eclipse.persistence.core/">EclipseLink</a> (reference implementation of JPA 2.0) you will be able to use these properties as follow :</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"&gt;

  &lt;persistence-unit name="chapter02PU" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
    &lt;class&gt;com.apress.javaee6.chapter02.Book&lt;/class&gt;
    &lt;properties&gt;
      &lt;property name="eclipselink.target-database" value="DERBY"/&gt;
      &lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables"/&gt;
      &lt;property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/&gt;
      &lt;property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/chapter02DB;create=true"/&gt;
      &lt;property name="javax.persistence.jdbc.user" value="APP"/&gt;
      &lt;property name="javax.persistence.jdbc.password" value="APP"/&gt;
    &lt;/properties&gt;
  &lt;/persistence-unit&gt;
&lt;/persistence&gt;</pre>
<p>Except for the <em>target-database</em> and <em>ddl-generation</em> properties, the rest of the <em>persistence.xml </em>file is portable across implementations. Again, this is just an example showing how Java EE 6 is trying to make code as portable as possible. If you want to know more about it, check the <a href="http://jcp.org/en/jsr/summary?id=317">JPA 2.0 specification</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/agoncal.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/agoncal.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/agoncal.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/agoncal.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/agoncal.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/agoncal.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/agoncal.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/agoncal.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/agoncal.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/agoncal.wordpress.com/407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=agoncal.wordpress.com&blog=7143934&post=407&subd=agoncal&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://agoncal.wordpress.com/2009/07/05/jpa-2-0-standard-properties-in-persistence-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1fc6aa04011b2f0f9721df913b0fd415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">agoncal</media:title>
		</media:content>
	</item>
	</channel>
</rss>