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

...

Anchortoptop
A typical J2EE application may contain Enterprise JavaBeans or EJBs. These beans contain the application's business logic and live business data. Although it is possible to use standard Java objects to contain your business logic and business data, using EJBs addresses many of the issues of using simple Java objects, such as scalability, lifecycle management and state management.

...

EJB implementation analysis Anchor#analysis#analysis

EJB implementation may vary from one vendor to another. The purpose of this section is to provide a session bean specific feature-to-feature comparison between JBoss and Apache Geronimo so you can clearly identify the differences and plan accordingly before migration.

...

Back to Top

Sample application Anchor#sample#sample

This is a simple eCommerce web site which sells computer related items in both retail and wholesale markets. To get the whole sale prices of items, customer has to buy at least given number of items. Otherwise he/she will get only retail prices of the item. End user of the application can add those items to their shopping cart. A stateless session bean has been used to manage the discount calculation business workflow activities while shopping cart of the application has been implemented with the help of a stateful session bean.

...

Back to Top

The JBoss enviroment Anchor#jboss#jboss

This section shows you how and where the sample JBoss reference environment was installed so you can map this scenario to your own implementation. Note that for this migration example JBoss v4.0.5 was used.

...

After extracting the zip file, a computer directory is created. In that directory open the build.properties file and edit the properties to match your environment as shown in the following example:

...

Before starting the build process just set the correct paths for the geronimo.home and xdoclet.home entries in the build.properties file in the config directory.

...

Back to Top

The Geronimo enviroment Anchor #geronimo#geronimo

Download and install Geronimo from the following URL:

...

The release notes available there provide clear instructions on system requirements and how to install and start Geronimo. Throughout the rest of this article we will refer to the Geronimo installation directory as <geronimo_home>.

...

...

If you are planning to run JBoss and Geronimo on the same machine consider to change the default service ports on, at least, one of these servers.

...

Back to Top

Step-by-step migration Anchor#migration#migration

When you built the computer acessories selling sample application, Ant packaged the deployment descriptors for both JBoss jboss.xml and Geronimo openejb-jar.xml as they were already provided by the sample application. These files are located in the computer/config directory.

The following example shows the JBoss deployment descriptor.

...

Compare it with the contents of the Geronimo deployment plan shown in the following example.

...

...

First difference can be clearly noted is Geronimo specific configuration has more additional information than JBoss specific one. That part of the Geronimo configuration file is quite similar to a Maven 2 build script. Both of these given configuration files has EJB information. JBoss uses local JNDI names to link their EJBs while Geronimo directly use EJB's name. In addition to above differences also openejb-jar.xml file clearly gives the ejb reference information than jboss.xml file.

Looking at the web archive related configuration files give you few more differnces.

...

...

jboss-web.xml map the EJBs from their JNDI names as given the above while geronimo-web.xml uses directly EJB's name. The reference names given in each mapping will be used refer EJBs from the Servlets. web.xml file of the WAR file contains more information about each EJB reference name, which will be common to the both Geronimo and JBoss flavours of this application.

...

Once the application is deployed, open a Web browser and access the following URL:
http://localhost:8080/computer

Back to Top

Summary Anchor#summary#summary

This article has shown how to migrate a sample application that uses Session Beans, from JBoss v4.0.5 to Apache Geronimo. This article provided step-by-step instructions to build the application, deploy and run it, and then migrate it to the Geronimo environment.

...