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
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.
Geronimo bundles powerful EJB container which supports
Geronimo supports J2EE connectors 1.5 which supports effective Inbound and Outbound resource adapters
Provides client container for deployment of applications in client managed environments.
Supports single EAR file for each deployment. It can also support application dependencies making it easy to maintain and run applications.
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.
Supports new Java Messaging Services (JMS 1.1). It allows components to create, send, receive and read messages.
Supports Java mail API supporting POP and IMAP servers.
Authentication and Authorizations are supported through JACC 1.0 api. JACC supports LDAP (Lightweight Directory Access Protocol).
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.
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:\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.
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’.
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.
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
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 commandsC:\> 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.
Open Source Developer
Liked it! Share this Tutorial
Ask Questions? Discuss: Apache Geronimo Application server Tutorial
Post your Comment