Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this case you may have some servlet,jsp's added to your application. You may have also configured security realms, Tomcat specific features like JSP reloading etc.

  • Servlet and JSP's code will work equally well with Tomcat and Geronimo. So there are no modifications required on this part.
  • In Tomcat you may have configured security realms in server.xml, also a admin, manager roles can be added using tomcat-users.xml file. In geronimo same can be achieved by adding the following tags <security-realm-name>geronimo-admin</security-realm-name> <sec:security> </sec:security> in geronimo-web.xml(geronimo specific deployment descriptor also known as deployment plan). Users and Groups can be added to the default realm by using the Security => Console Realm menu from the Web console menu.

Tomcat and Apache Derby

For Tomcat to work with Apache Derby you have to download Apache Derby and configure environment variables like DERBY_INSTALL. You also need to make sure that the following jars are present in the classpath

  • lib/derby.jar
  • lib/derbytools.jar
  • lib/derbynet.jar
  • lib/derbyclient.jar
    To execute a sql command you have to use ij scipt which comes packaged with Apache Derby.

With regarda to Apache Geronimo there is no need for setting up environment variables or classpath. This is take care of by geronimo. Creating database table and database pool can be easily achieved by using web based Administrative Console. However you have to include a <dependency> </dependency> tag and <resource-ref> </resource-ref> tag in geronimo-web.xml so that the resources are visible to the deployed application.
All the other suggestions made in Tomcat only application is equally vaild in this scenario as well.

Tomcat and Apache AXIS.

For Tomcat to work you have to include the following elements in your CLASSPATH environment variable. The jars mentioned below can be automatically downloaded within eclipse if you have set up the development environment in eclipse. This can be easily achieved by adding a wsdl file in your application and using Eclipse WSDL to Java tool to generate all the required artifacts including your java classes.

  • wsdl4j-1.5.1.jar
  • saaj.jar
  • jaxrpc.jar
  • axis.jar

With regards to Apache Geronimo you need not set any of the above mentioned libraries in your classpath as these are pre-integrated.

Tomcat and Apache ActiveMQ

Make sure you have apache activemq installed. Include the following elements in your CLASSPATH environment variable. Yyou have to specify the JMS resources that is queue and connection factory in context.xml available with Tomcat installation using the <Resource> </Resource> tags. Next you need to specify the resource reference, message destination reference and message destination using <resource-ref>, <message-destination-ref>, <message-destination> tag in web.xml.

lib/activeio-core-3.0.0-incubator.jar
lib/commons-logging-1.1.jar
<ActiveMQ_HOME>/apache-activemq-4.1.1.jar

Start the ActiveMQ broker by running the activemq.bat script. This script can be found in <ActiveMQ_HOME>/bin

In Geronimo connection factory and queue can be easily created using the GUI based web console. Active MQ is automatically started on server start. The jars mentioned are no longer required and should be removed from ClassPath. However you have to include a Active MQ dependency using <dependency> </dependency> tags, resource references using <resource-ref> </resource-ref> tags and message destination using <message-destination> </message-destination> tags in geronimo-web.xml.

Port Configuration

In case you have modified ports in server.xml of your Tomcat installation and you want to achieve the same. This can be done by modifying config-substitution.properties available in <GERONIMO_HOME>/var/log/config-substitution.properties. PortOffset variable in config-substitution.properties can be used to modify all the ports in one go or else each port can be configured to custom values.

Remove unneeded jars

In case of Tomcat you may have included various jars in your application in WEB-INF/lib. Most of these jars are already present in geronimo and can be removed from the application. This will also reduce the size of your application to few KBs in geronimo which would have been MBs in case of Tomcat. Also by removing these jars developer no longer need to support and integrate these
jars.

Do Not want to remove jars

In case you are unwilling to remove jars from your current environment. May be you want to use your version of jars and geronimo ships a very different version of jars. In that case also geronimo provides an easy configuration. You can configure geronimo-web.xml to add <inverse-classloading/> tag. Using this tag the classloading hierarchy will change to Child First.