Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

A first look at Apache Geronimo

Start developing and deploying J2EE apps on Apache's open source J2EE server

  • Print
  • Feedback
The ambitious Apache Geronimo project has been going full-steam for more than a year now and has recently made its third milestone release. If you haven't checked it out yet, this article will help you get started. We'll download and install Geronimo, review some of its architecture, and go through a couple of sample J2EE applications.

Although no date has been set for the official release, its list of stated goals is indeed impressive:

  • Pass Sun Microsystems' J2EE 1.4 certification
  • Reuse as much existing ASF (Apache Server Foundation) code as possible
  • Integrate technology outside of ASF within Geronimo, most notably OpenEJB and ActiveMQ from codehaus.org


Geronimo is a J2EE server, which means it includes all the containers required by the J2EE 1.4 specification (but, thanks to smart thinking, is backwards compatible to earlier versions). Wherever possible, Geronimo uses existing open source products. Some of these are:

  • Servlet container services: Jetty and Tomcat
  • Enterprise JavaBean container: OpenEJB
  • Java Message Service (JMS) provider: ActiveMQ
  • Database connection pooling: TranQL
  • Transaction support: HOWL (High-speed ObjectWeb Logger)
  • Database: Axion, Derby
  • Java Management Extensions (JMX) support: MX4J


Each service is implemented by a core object called a GBean. Much work went into the design of these GBeans so the core server could manage their entire lifecycles without manual intervention.

Geronimo and JBoss
Geronimo has also had to deal with some legal noise from JBoss, who alleges similarities between the Geronimo and JBoss codebases. It appears as if the ASF has successfully repudiated these allegations, but as yet, JBoss has not acquiesced. If nothing else, this situation means the project is being carefully watched by its competitors!


Build and install Geronimo

Although the Geronimo team makes milestone releases available (the current one is M3), I recommend using the latest source and building Geronimo yourself. While building from source can be time consuming, you will need the latest source to get the examples in this article to work. (I did my best to get them running on M3, but alas, they wouldn't all work.) To build Geronimo, you need three things: the Subversion version control system client, Apache Maven, and the Geronimo source code. I assume you have downloaded and installed the first two per their instructions. Now, with both the Subversion client and the Maven executable in your PATH, you can build Geronimo.

First, you need to download Geronimo. To do that, type this Subversion command:

 svn checkout http://svn.apache.org/repos/asf/geronimo/trunk geronimo



This command creates a directory called geronimo, which contains the Geronimo source code, in the directory where you are currently located. Now, change into the geronimo directory and do the build:

 cd geronimo
maven -Dmaven.test.skip=true -Dmaven.itest-skip=true m:rebuild-all 



The two system properties tell Maven to ignore all the tests and just do a straight build. While the Geronimo build instructions tell you to build without them, I couldn't get Geronimo built without some tests failing. Thankfully, however, whatever failed did not affect this article's examples.

  • Print
  • Feedback

Resources