Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Anchor
top
top

If you are in a hurry to have Apache Geronimo up and running right away, this article will provide you with some basic steps for downloading, building (when needed) and run the server in no time. This is clearly not a complete guide so you may want to check the other links in the Apache Geronimo v1.1 - User's Guide main section for further information.

All you need is 5 to 10 minutes and to follow these basic steps.

...

Background

Apache Geronimo is a full J2EE 1.4 certified application server that is completely open source and under the Apache Software License. Geronimo first passed the Technology Compatibility Kit(TCK) test in 2005 and v1.0 was released in January 2006. The Geronimo community is backed by over 28 30 committers from more than 8 companies, multiple organizations have already started builing applications on Geronimo. Geronimo v1.1 is the second official release of the application server by the Apache Software Foundationdifferent companies and individuals.

Getting the software

At this time you have one option There are currently two way to get the released software. The You can either retrieve it from the Apache SVN repository or fhe fastest and easiest way is to get the binary directly from the Apache Geronimo site. Since this article is intended to help you to have Apache Geronimo up and running in the fastest possible way, only the binary download will be covered at this time.

...

http://geronimo.apache.org/downloads.html

Note

Apache Geronimo v1.1 2 is certified on J2EE 1.4 but it works with 1.5 as long as CORBA or daytrader are is not used.

Select the file compression format compatible with your system (zip, tar, gz) by clicking directly on the link, download it and expand the binary to your hard drive in a new directory. For example in z:/geronimo, from now on this directory will be referenced as <geronimo_home>.

...

With Apache Geronimo already installed, open a command line console and change directory to <geronimo_home>/bin. In that directory you will find some script files (.bat and .sh) and five several .jar files. If you look at these five files you will find:

  • client.jar
  • deployer.jar
  • serverjpa.jar
  • upgradeserver.jar
  • shutdown.jar

These jar files can be started launched by using the java -jar to invoke the main class in <geronimo_home>/bin/<the name of the .jar file>. <file.jar>
The client.jar file can be used to start the Geronimo configuration that contains the application client that you want to run.
The deployer.jar file is a Java application that manages J2EE artifacts and GBeans that run on the Geronimo server.
The jpa.jar file is for OpenJPA persistance support.
The server.jar file is used to start the Geronimo server.
The shutdown.jar file can be invoked from command line to shutdown the server.

...

To start the server run the following command:

java -jar server.jar

Alternatively a script is provided, the startup script will also start the server. Once the server is started you should see the following information on the command line console.

No Format
bgColor#000000
borderStylesolid

Using GERONIMO_BASE:   D:\geronimo-1.2-Tomcat
Using GERONIMO_HOME:   D:\geronimo-1.2-Tomcat
Using GERONIMO_TMPDIR: D:\geronimo-1.2-Tomcat\var\temp
Using JRE_HOME:        C:\Java\jdk1.5.0_06\\jre
Booting Geronimo Kernel (in Java 1.5.0_06)...
Starting Geronimo Application Server v1.12
[*************************] 100%  32s21s Startup complete
  Listening on Ports:
    1099 0.0.0.0 RMI Naming
    1527 0.0.0.0 Derby Connector
    4201 0.0.0.0 ActiveIO Connector EJB
    4242 0.0.0.0 Remote Login Listener
    8009 0.0.0.0 Tomcat Connector AJP
    8080 0.0.0.0 Tomcat Connector HTTP
    8443 0.0.0.0 Tomcat Connector HTTPS
    9999 0.0.0.0 JMX Remoting Connector
   61613 0.0.0.0 ActiveMQ Transport Connector
   61616 0.0.0.0 ActiveMQ MessageTransport Broker Connector

  Started Application Modules:
    EAR: org.apache.geronimo.configs/webconsole-tomcat/1.12/car
    RAR: org.apache.geronimo.configs/activemq/1.12/car
    RAR: org.apache.geronimo.configs/system-database/1.2/car
    WAR: org.apache.geronimo.configs/dojo-tomcat/1.2/car
    WAR: org.apache.geronimo.configs/remote-deploy-tomcat/1.12/car
    WAR: org.apache.geronimo.configs/welcome-tomcat/1.12/car

  Web Applications:
    http://hcunicolocalhost:8080/
    http://hcunicolocalhost:8080/console
    http://hcunicolocalhost:8080/console-standard
    http://localhost:8080/dojo
    http://hcunicolocalhost:8080/remote-deploy

Geronimo Application Server started

To test the Apache Geronimo server you can just point your Web browser to the following URL to test the Geronimo Console. The Geronimo Administration Console is the first application you can test, and the good thing is, it is already deployed in the standard, full J2EE certified distribution.

http://localhost:8080/console

...

Although for such a simple application it is not necessary, you we will still create a Geronimo deployment plan so you would get a first view glimpse of the deployment plans. Create a directory named WEB-INF inside the <app_home> directory.

...

Code Block
xml
xml
borderStylesolid
titleGeronimo deployment plan geronimo-web.xml
<?xml version="1.0" encoding="UTF-8" ?>
<web-app
   xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
   xmlns:naming="http://geronimo.apache.org/xml/ns/naming">

   2">
	<environment>
		<moduleId>
			<groupId>sample.applications</groupId>
			<artifactId>HelloWorldApp</artifactId>
			<version>1.2</version>
			<type>war</type>
		</moduleId>		
	</environment>
  	<context-root>/hello</context-root>

</web-app>
Note
This version of geronimo-web.xml will not work in Geronimo v1.0
 

Create a plain text file in the <app_home>/WEB-INF directory named web.xml and copy the content of the following example.

Code Block
xml
xml
borderStylesolid
titleweb.xml
<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"

   xmlns="http://java.sun.com/xml/ns/j2ee"
    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">

    <welcome-file-list>
         <welcome-file>HelloWorld.jsp</welcome-file>
    </welcome-file-list>

</web-app>

Package the application

From a command line window change directory to <app_home> and run the following command to package the HelloWorld application into a single .war file.

jar -cvf HelloWorld.war *

This will create a HelloWorld.war file in the <app_home> directory. The next step is to deploy this applicationFor your convenience, you can download the HelloWorld (HelloWorld_1.2.zip or HelloWorld.war) sample application provided with this article.

Deploy and test the application

To deploy For this example we will not invest time in packaging the application you have two options, you can use the Geronimo Console or the command line. For this example you will use both.

Through the console

Log into the Geronimo console and click on the  Deploy New link of the Applications folder located on the left hand side of the console navigation panel. This will load the Install New Applications window.Image Removed
Then select and load the HelloWorld.war file into the Archive input box and click install button to deploy application in to the server. Once the application is successfully deployed, the screen will be updated with a successful deploy message. Before clicking the install button, make sure that the "Start app after install" checkbox is enabled.

Through command line, we will just use the --inPlace feature of the deployer tool which allows us to deploy an application from any directory.

Change directory to <geronimo_home>/bin and run the following command:

java -jar deployer.jar --user system --password manager deploy --inPlace <app_home>/HelloWorld.war

Once the application is successfully deployed you should see the following message:

No Format
bgColor#000000
borderStylesolid
ED:\geronimo-1.2-Tomcat\bin>java -jar deployer.jar --user system --password manager deploy --inPlace E:\HelloWorld\HelloWorld_1.war2
    Deployed HelloWorldsample.applications/HelloWorldApp/1.2/war @
    http://hcunicolocalhost:8080/hello

Test the application by pointing a Web browser to the following URL:

...

This article showed you how simple is to have Apache Geronimo up and running. The overall time for getting the server running should be less than five minutes if you have the prerequisite (Java 1.5) prerequisites already installed. Additionally, this article also showed you how to create, deploy and test a very simple JSP in less than five minutes.