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

...

anchortop
top This document describes the steps to run JBoss Seam's booking sample application on Apache Geronimo 2.1.1. You can read about JBoss Seam at its web site.

...

This document applied to JBoss Seam 2.0.0.GA. Download it from http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=163777&release_id=551158

...

.

...

...

This document now applies to the Geronimo 2.1.1 release.
Also, it is in the process of being updated - the instructions may only be partially corrected.
At this point the instruction have been updated up until the point before the new Hibernate transaction manager jar is installed in the Geronimo repository.
The remaining instructions should work, but they have not been tested yet.

...

Hibernate doesn't support Geronimo by default as far as Geronimo transaction manager's concerned. Whenever Hibernate does transaction management it needs a JTA transaction manager which is a necessary component of every Java EE application server. Geronimo provides one, but Hibernate doesn't know how to look it up. We need to learn the nifty things about the transaction manager in Geronimo and provide a lookup class for Hibernate to access Geronimo transaction manager. With the class - org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup - Hibernate will be able to do its duties.

...

...

You can read more about migrating JBoss/Hibernate applications to Geronimo at The documentation about JBoss to Geronimo - Hibernate Migration.

...

geronimo-hibernate-transaction-manager-lookup maven project

...

Go to any directory you want where the maven project for Hibernate Transaction Manager Lookup class for Geronimo is to be created.

...

Notice that there are a couple of inputs that you must make:
1) When Maven asks you to select an archetype type - choose quickstart, enter: 15
2) When Maven asks you for a value of the version, enter: 1.0-SNAPSHOT
3) When Maven asks you for the package, enter: org.apache.geronimo.hibernate

Replace the content of pom.xml which is the main configuration file of any maven project to the following:

...

Change your working directory to the project's directory, e.g. c:/geronimo-hibernate-transaction-manager-lookup and do the following steps from within it.

...

Create the org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup class in src/main/java/org/apache/geronimo/hibernate/transaction/ directory.

...

Build GeronimoTransactionManagerLookup class with mvn install command.

...

...

Install the file - geronimo-hibernate-transaction-manager-lookup-1.0-SNAPSHOT.jar - to Geronimo artifact repository, i.e. ${GERONIMO_HOME}/repository.

With Geronimo stopped, create a directory and place geronimo-hibernate-transaction-manager-lookup-1.0-SNAPSHOT.jar in it.

...

...

Hibernate JPA change

...

As of GERONIMO-3880 PersistenceUnitInfo.getJarFileUrls() can return null, i.e. Geronimo 2.2-SNAPSHOT built after 02/27 you should not run into this issue and hence no need to execute the steps described in this section.

...

If you tried to deploy JBoss Seam's booking application with Hibernate JPA as it is now it would choke with NPE.

...

Without delving into much detail it boils down to patching org.hibernate.ejb.Ejb3Configuration to avoid NPE. Download the class from its source code repository at http://fisheye.jboss.com/browse/Hibernate/entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.javaImage Removed and patch it with the following changes:

...

With the class patched, compile it with the same command as you build the booking example - ant clean archive and update hibernate-entitymanager.jar that's available in {${JBOSSSEAM_HOME}/lib}.

...

After the change you'll have to rebuild the booking example once more.

...

...

The plan Anchorplanplan

The plan configures necessary Geronimo resources to deploy JBoss Seam's booking sample application.

...

...

Starting Geronimo

Type it in on the command line.

...

Deploying jboss-seam-jee5.ear

You can now deploy jboss-seam-jee5.ear from the web console of Geronimo, but there's another way to do the same - executing deploy command on the command line.

...

...

The Geronimo console shows deployment progress as follows:

...

...

Running the webapp

Point the browser of your choice to http://localhost:8080/seam-jee5/. You should see booking's welcome page.

...