Apache Geronimo Application server Tutorial

Apache Geronimo is a open source JavaEE( or J2EE, old name) application server. This section introduces you with the Apacehe Geronimo Application Server.


Jersey - Java Framework for RESTful Web services Web Services in Java Tutorial for Beginners Web Services Growth Apache Axis2 Tomcat: Installing Apache Axis2 on Tomcat Introduction to Web services technologies Installing axis2 eclipse plugin Axis2 Eclipse plugin Tutorial Axis2 ant wsdl2java - Learn WSDL2java utility of Axis2 with example Axis2 client - Axis2 Client example Apache Axis2 Hello World Example Downloading and Installing Apache Axis2 Apache Axis2 Introduction Apache Axis2 - Apache Axis2 Tutorial Database driven webservices JAX-RPC Advance Concepts Security in Web Service Application Using JAX-RPC WSDL program SOAP Header SOAP with Attachments API for Java Ejb Webservice Java Client webservice Web Service WEBSERVICE USING APACHE AXIS- TUTORIAL-2 J2ME CLIENT FOR EJB & EJB-WEBSERVICE WEBSERVICE USING APACHE AXIS TUTORIAL-2 Web Services Tutorials and Links WEBSERVICE USING APACHE AXIS - TUTORIAL-2 AXIS FOR EJB-WEBSERVICE (part-5) WEBSERVICE USING APACHE AXIS TUTORIAL-2 UNDERSTANDING APACHE AXIS WEBSERVICE USING APACHE AXIS TUTORIAL-1 WEBSERVICE USING APACHE AXIS TUTORIAL-2 UNDERSTANDING APACHE AXIS (part-2) WEBSERVICE USING APACHE AXIS -TUTORIAL-2 UNDERSTANDING APACHE AXIS What is Service-Oriented Architecture? Developing Axis Web services with XML Schemas. Web Services - Web Services Tutorials WEBSERVICE USING APACHE AXIS TUTORIAL-2 UNDERSTANDING APACHE AXIS J2EE Web Service Development with Attachments Using Axis J2EE Web Service Development with Attachments Using Axis SOA and Web Services Web Services Examples in NetBeans SOA and Web Services

Apache Geronimo

Apache Geronimo is a open source JavaEE( or J2EE, old name) application server. It is so much capable that it can give commercial servers a hard competition. In short Geronimo is full fledged JavaEE application server which uses Industry respected and Industry proven Apache technologies, very much fast and reliable and yes above all it doesn’t costs you a penny.

It is a J2EE 1.4 certified application server, however it is completely backward compatible with J2EE 1.2 and J2EE 1.3 specifications also.

Geronimo is a modular software and consists of various modules which are further dependent on Other open source software. This makes it very customizable and easily extendable.

Advantages of Using Geronimo

  • Complete J2EE 1.4 application server.
  • Built on Best available Open Source components.
  • Modular Architecture
  • Integrated Apache Derby DB and LDAP.
  • Web management console.
  • Custom distribution can be built easily.
  • Uses Apache License, means you can use apache Geronimo to develop commercial applications without reveling your own code.

Geronimo Incorporates following features

  • Web Applications Support

It supports Servlet 2.4 and JSP 2.0 specifications. Further it came tightly integrated with other modules. Application container supports SSL connections for secure application development.

  • Enterprise Java Bean 2.1

Geronimo bundles powerful EJB container which supports

    • Sessions
    • Entity
    • Message Driven Beans
    • Web Services
    • EJB Timer Service
  • J2EE Connectors 1.5

Geronimo supports J2EE connectors 1.5 which supports effective Inbound and Outbound resource adapters

  • J2EE 1.4 Client Application Support

Provides client container for deployment of applications in client managed environments.

  • J2EE 1.4 Application Archives support

Supports single EAR file for each deployment. It can also support application dependencies making it easy to maintain and run applications.

  • JDBC 3.0

New and improved JDBC 3.0 is now built into heart of Geronimo. Provides high performance Database connection. JDBC 3.0 now supports Metadata APIS, Named Parameter in callable statements and some modified data types.

  • JMS 1.1

Supports new Java Messaging Services (JMS 1.1). It allows components to create, send, receive and read messages.

  • JavaMail 1.3

Supports Java mail API supporting POP and IMAP servers.

  • LDAP Support

Authentication and Authorizations are supported through JACC 1.0 api. JACC supports LDAP (Lightweight Directory Access Protocol).

Geronimo Components

Already discussed that Geronimo is built on various open source components. In this section we will take an overview of those.

A popular Web application container for Geronimo.

Do not confuse Geronimo with Tomcat, Tomcat only provides a Servlet Container suitable for hosting web applications while Geronimo is designed to implement the entire J2EE (or JavaEE) framework including Servlet container, Java Messaging etc.

Open Source EJB container for Geronimo.

Alternative Application Server for tomcat.

JMS (Java Messaging Service) provider.

Provides database connection pooling adapters.

Provides transaction logging and recovery facilities.

Provides Web Services support.

High Performance Embedded database server from Apache server foundation.

Byte code manipulation library.

Class Library for currency handling.

Provides Common Utilities function, part of Original Apache Jakarta project.

Implements Java Messaging Extensions (JMX).

Provides powerful template engine for Geronimo, part of Oringal Apache Jakarta Project.

Provides a set of powerful XML languages bindings.

Now you might have got an idea about what Apache Geronimo has to provide. Built on world class components.

Further in this article we will se how to install and run a basic application on Geronimo server. In later series of this article we will also cover some advanced stuffs like building your own distribution out of Geronimo and things like that.

Installing and Running Geronimo

Installation is very much straight forward.

1. Download latest Apache Geronimo Distribution from following location:-


2. Extract this file into C:\Apache\Geronimo directory.

After the extraction of files you will have following directory structure created on your hard drive.

3. Start the server by issuing following command.

C:\>cd apache

C:\Apache\>cd geronimo

C:\Apache\Geronimo\> java –jar bin/server.jar

For a successful server start you can following messages

Please note that this step requires a few special things to be confirmed.

  • Make sure you have JDK version 1.4 is installed and is in System path, otherwise you won’t be able to run java command.
  • Port number 8080 should be open. If you have not installed previous Tomcat installation. Please do it now to in order to prevent conflict with Germonio version of Tomcat, also if some proxy server or any other application is using port no 8080 please shut it down.

If you are unable to shutdown the application which are using mentioned ports, then you have to change the port settings for Apache Geronimo itself.

Open config.xml file from directory ‘C:\Apache\geronimo\var\config’.

<gbean name="TomcatWebConnector">

<attribute name="host"></attribute>

<attribute name="port">8080</attribute>

<attribute name="redirectPort">8443</attribute>


Change port value to required value. Save changes and restart the server.

If any other component’s port number is bugging you can change those also. Just look for <attribute name="port">8080</attribute> under gbean name property.

Building J2EE HelloWorld Application

Download the sample helloworld application from following URI.


Install ant. Ant is very popular open source build tool for Java based applications. Download ant from http://ant.apache.org/. Install it and set the path variables accordingly.

Extract hello1.zip into folder of your choice.

Step 1: Issue following commands to build the examples using ant.

C:\> cd hello1

C:\> ant

This will build application in the current folder.

Step 2: Modify web.xml file to include id propery as shown in code below.

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="hello1" > <display-name>hello1</display-name> </web-app>

Step 3: Now you need to create a Geronimo Specific web application descriptor. It is almost same as Web.xml file but also includes some specifc objects.

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://geronimo.apache.org/xml/ns/web" configId="j2eetutorialhello1" parentId="org/apache/geronimo/Server" > <context-root>/j2eetutorialhello1</context-root> <context-priority-classloader>false</context-priority-classloader> </web-app>

Please note that the xmlns directs to the XML schema. From time to time due to rapid changes in Geronimo application server architecture this Schema can also be changed. So make sure you are using the right syntax.

Step 4: Now you need to create a WAR file, for single file deploymnet purposes.

C:\> cd hello1/build C:\> jar -cf ../j2eehello1.war *

Step5: Everything done now. Now you want to start the server and deploy the application.

Change to home directory of Gerenomio. And issue following commands

C:\> java -jar bin/server.jar

This command will start the server.

Then enter following command for the deployment

$ java -jar bin/deployer.jar --user system --password manager deploy " j2eehello1.war" Distributed j2eetutorialhello1

Point your browser to http://localhost:8080/j2eetutorialhello1/

And you will get popular hello world written inside the browser.

In next series of article we will explain how to configure and write advanced application with Apache Geronimo.

Kunal Deo
Open Source Developer