You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


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 Transaction Manager Lookup class for Geronimo

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

To simplify the step here's how the tx manager lookup class is developed using Apache Maven 2. No one said it's going to be easy, but it's not as hard as it could be.

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

bash-3.2$ mvn archetype:create -DgroupId=org.apache.geronimo.hibernate -DartifactId=geronimo-hibernate-transaction-manager-lookup
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:create] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] Preparing archetype:create
[INFO] No goals needed for project - skipping
Downloading: http://repo1.maven.org/maven2/org/apache/geronimo/hibernate/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom
Downloading: http://repo1.maven.org/maven2/org/apache/geronimo/hibernate/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create]
Choose archetype:
1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF)
2: internal -> appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC)
3: internal -> appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2)
4: internal -> appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4)
5: internal -> appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire)
6: internal -> appfuse-modular-jsf (AppFuse archetype for creating a modular application with Hibernate, Spring and JSF)
7: internal -> appfuse-modular-spring (AppFuse archetype for creating a modular application with Hibernate, Spring and Spring MVC)
8: internal -> appfuse-modular-struts (AppFuse archetype for creating a modular application with Hibernate, Spring and Struts 2)
9: internal -> appfuse-modular-tapestry (AppFuse archetype for creating a modular application with Hibernate, Spring and Tapestry 4)
10: internal -> maven-archetype-j2ee-simple (A simple J2EE Java application)
11: internal -> maven-archetype-marmalade-mojo (A Maven plugin development project using marmalade)
12: internal -> maven-archetype-mojo (A Maven Java plugin development project)
13: internal -> maven-archetype-portlet (A simple portlet application)
14: internal -> maven-archetype-profiles ()
15: internal -> maven-archetype-quickstart ()
16: internal -> maven-archetype-site-simple (A simple site generation project)
17: internal -> maven-archetype-site (A more complex site project)
18: internal -> maven-archetype-webapp (A simple Java web application)
19: internal -> struts2-archetype-starter (A starter Struts 2 application with Sitemesh, DWR, and Spring)
20: internal -> struts2-archetype-blank (A minimal Struts 2 application)
21: internal -> struts2-archetype-portlet (A minimal Struts 2 application that can be deployed as a portlet)
22: internal -> struts2-archetype-dbportlet (A starter Struts 2 portlet that demonstrates a simple CRUD interface with db backing)
23: internal -> struts2-archetype-plugin (A Struts 2 plugin)
24: internal -> shale-archetype-blank (A blank Shale web application with JSF)
25: internal -> maven-adf-archetype (Archetype to ease the burden of creating a new application based with ADF)
26: internal -> data-app (A new Databinder application with sources and resources.)
27: internal -> jini-service-archetype (Archetype for Jini service project creation)
28: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype)
29: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype)
30: internal -> softeu-archetype-jsf (JSF+Facelets Archetype)
31: internal -> jpa-maven-archetype (JPA application)
32: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype)
33: internal -> confluence-plugin-archetype (Atlassian Confluence plugin archetype)
34: internal -> maven-archetype-har (Hibernate Archive)
35: internal -> maven-archetype-sar (JBoss Service Archive)
36: internal -> wicket-archetype-quickstart (A simple Apache Wicket project)
Choose a number:  (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36): 15
[INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart: checking for updates from maven-archetype-quickstart-repo
Define value for version: : 1.0-SNAPSHOT
Define value for package: : org.apache.geronimo.hibernate
Confirm properties configuration:
groupId: org.apache.geronimo.hibernate
artifactId: geronimo-hibernate-transaction-manager-lookup
version: 1.0-SNAPSHOT
package: org.apache.geronimo.hibernate
 Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: maven-archetype-quickstart:RELEASE
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.apache.geronimo.hibernate
[INFO] Parameter: packageName, Value: org.apache.geronimo.hibernate
[INFO] Parameter: basedir, Value: /home/jaydm
[INFO] Parameter: package, Value: org.apache.geronimo.hibernate
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: artifactId, Value: geronimo-hibernate-transaction-manager-lookup
[INFO] ********************* End of debug info from resources from generated POM ***********************
[INFO] OldArchetype created in dir: /home/jaydm/geronimo-hibernate-transaction-manager-lookup
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47 seconds
[INFO] Finished at: Thu Feb 21 19:21:55 CST 2008
[INFO] Final Memory: 8M/40M
[INFO] ------------------------------------------------------------------------

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:

pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.geronimo.hibernate.transaction</groupId>
    <artifactId>geronimo-hibernate-transaction-manager-lookup</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>geronimo-hibernate-transaction-manager-lookup</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jta_1.1_spec</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.5.ga</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-kernel</artifactId>
            <version>2.1.1</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

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 src/main/java/org/apache/geronimo/hibernate/transaction directory.

Delete src/main/java/org/apache/geronimo/hibernate/App.java.

Delete src/test/java/org/apache/geronimo/hibernate/AppTest.java.

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

org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup
package org.apache.geronimo.hibernate.transaction;

import java.util.Properties;
import java.util.Set;

import javax.transaction.TransactionManager;

import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.KernelRegistry;
import org.hibernate.HibernateException;
import org.hibernate.transaction.TransactionManagerLookup;

public class GeronimoTransactionManagerLookup implements TransactionManagerLookup {

    public static final String UserTransactionName = "java:comp/UserTransaction";

    public TransactionManager getTransactionManager(Properties props) throws HibernateException {
        try {
            Kernel kernel = KernelRegistry.getSingleKernel();
            AbstractNameQuery query = new AbstractNameQuery(TransactionManager.class.getName ());
            Set<AbstractName> names = kernel.listGBeans(query);
            
            if (names.size() != 1) {
                throw new IllegalStateException("Expected one transaction manager, not " + names.size());
            }
            
            AbstractName name = names.iterator().next();
            TransactionManager transMg = (TransactionManager)
            kernel.getGBean(name);
            
            return (TransactionManager)transMg;
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println();
            
            throw new HibernateException("Geronimo Transaction Manager Lookup Failed", e);
        }
    }

    public String getUserTransactionName() {
        return UserTransactionName;
    }
}

Build GeronimoTransactionManagerLookup class with mvn install command.

$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building geronimo-hibernate-transaction-manager-lookup
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] Surefire report directory: c:\projs\sandbox\geronimo-hibernate-transaction-manager-lookup\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] [install:install]
[INFO] Installing c:\projs\sandbox\geronimo-hibernate-transaction-manager-lookup\target\geronimo-hibernate-transaction-manager-lookup-1.0-SNAPSHOT.jar to 
C:\.m2\org\apache\geronimo\hibernate\transaction\geronimo-hibernate-transaction-manager-lookup\1.0-SNAPSHOT\geronimo-hibernate-transaction-manager-lookup-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Sat Jun 07 23:53:25 CEST 2008
[INFO] Final Memory: 9M/254M
[INFO] ------------------------------------------------------------------------

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.

jlaskowski@dev /cygdrive/c/geronimo
$ mkdir -p repository/org/apache/geronimo/hibernate/transaction/geronimo-hibernate-transaction-manager-lookup/1.0-SNAPSHOT

jlaskowski@dev /cygdrive/c/geronimo
$ cp c\:/.m2/org/apache/geronimo/hibernate/transaction/geronimo-hibernate-transaction-manager-lookup/1.0-SNAPSHOT/geronimo-hibernate-transaction-manager-lookup-1.0-SNAPSHOT.jar \
repository/org/apache/geronimo/hibernate/transaction/geronimo-hibernate-transaction-manager-lookup/1.0-SNAPSHOT/

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.

java.lang.NullPointerException at Hibernate processing of PersistenceUnitInfo bookingDatabase
12:10:24,359 INFO  [Version] Hibernate Annotations 3.3.0.GA
12:10:24,437 INFO  [Environment] Hibernate 3.2.4.sp1
12:10:24,734 INFO  [Environment] hibernate.properties not found
12:10:24,734 INFO  [Environment] Bytecode provider name : cglib
12:10:24,750 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
12:10:25,171 INFO  [Version] Hibernate EntityManager 3.3.1.GA
12:10:25,328 INFO  [Ejb3Configuration] Processing PersistenceUnitInfo [
        name: bookingDatabase
        ...]
12:10:25,328 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.jboss.seam.examples.jee5/jboss-seam-jee5/2.0.0.GA/ear?EJBModule=jboss-s
eam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.0.0.GA/ear,PersistenceUnitModule=jboss-seam-jee5.jar,j2eeType=PersistenceUnit,name=bookingDatabase"
java.lang.NullPointerException
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:346)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
        at org.apache.geronimo.persistence.PersistenceUnitGBean.<init>(PersistenceUnitGBean.java:117)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:946)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:539)
        at org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
        at org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
        at org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
        at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176)
        at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
        at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:254)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:294)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:539)
        at org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
        at org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
        at org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
        at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176)
        at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
        at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:254)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:294)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:553)
        at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:448)
        at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:530)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:511)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
        at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:168)
        at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
        at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
        at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
        at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
        at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)

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.java and patch it with the following changes:

Ejb3Configuration.patch
--- src/org/hibernate/ejb/Ejb3Configuration.java        2007-11-30 13:36:31.234375000 +0100
+++ src/org/hibernate/ejb/Ejb3Configuration.java.patched        2007-11-30 13:39:33.609375000 +0100
@@ -341,9 +341,11 @@

                        boolean[] detectArtifactForOtherJars = getDetectedArtifacts( info.getProperties(), null, false );
                        boolean[] detectArtifactForMainJar = getDetectedArtifacts( info.getProperties(), null, info.excludeUnlistedClasses() );
+                       if (info.getJarFileUrls() != null) {
                        for ( URL jar : info.getJarFileUrls() ) {
                                scanForClasses( jar, packages, entities, hbmFiles, detectArtifactForOtherJars, searchForORMFiles );
                        }
+                   }
                        scanForClasses( info.getPersistenceUnitRootUrl(), packages, entities, hbmFiles, detectArtifactForMainJar, searchForORMFiles );

                        Properties properties = info.getProperties() != null ?
jlaskowski@dev /cygdrive/c/apps/jboss-seam-2.0.0.GA/examples/jee5/booking
$ patch -p0 src/org/hibernate/ejb/Ejb3Configuration.java Ejb3Configuration.patch
patching file src/org/hibernate/ejb/Ejb3Configuration.java

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}.

jlaskowski@dev /cygdrive/c/apps/jboss-seam-2.0.0.GA/examples/jee5/booking
$ ant clean archive
Buildfile: build.xml
...
archive:
      [jar] Building jar: c:\apps\jboss-seam-2.0.0.GA\examples\jee5\booking\dist\jboss-seam-jee5.jar
      [jar] Building jar: c:\apps\jboss-seam-2.0.0.GA\examples\jee5\booking\dist\jboss-seam-jee5.war
      [jar] Building jar: c:\apps\jboss-seam-2.0.0.GA\examples\jee5\booking\dist\jboss-seam-jee5.ear

BUILD SUCCESSFUL
Total time: 8 seconds

jlaskowski@dev /cygdrive/c/apps/jboss-seam-2.0.0.GA/examples/jee5/booking
$ cd exploded-archives/jboss-seam-jee5.jar/

jlaskowski@dev /cygdrive/c/apps/jboss-seam-2.0.0.GA/examples/jee5/booking/exploded-archives/jboss-seam-jee5.jar
$ jar -uvf ../../../../../lib/hibernate-entitymanager.jar org/hibernate/ejb/Ejb3Configuration*
adding: org/hibernate/ejb/Ejb3Configuration$1.class(in = 1031) (out= 499)(deflated 51%)
adding: org/hibernate/ejb/Ejb3Configuration$2.class(in = 1027) (out= 497)(deflated 51%)
adding: org/hibernate/ejb/Ejb3Configuration$3.class(in = 1378) (out= 726)(deflated 47%)
adding: org/hibernate/ejb/Ejb3Configuration$Ejb3EntityNotFoundDelegate.class(in = 1332) (out= 610)(deflated 54%)
adding: org/hibernate/ejb/Ejb3Configuration$XML_SEARCH.class(in = 1487) (out= 726)(deflated 51%)
adding: org/hibernate/ejb/Ejb3Configuration.class(in = 40497) (out= 16953)(deflated 58%)

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

jlaskowski@dev /cygdrive/c/apps/jboss-seam-2.0.0.GA/examples/jee5/booking
$ ant clean archive
Buildfile: build.xml
...
archive:
      [jar] Building jar: c:\apps\jboss-seam-2.0.0.GA\examples\jee5\booking\dist\jboss-seam-jee5.jar
      [jar] Building jar: c:\apps\jboss-seam-2.0.0.GA\examples\jee5\booking\dist\jboss-seam-jee5.war
      [jar] Building jar: c:\apps\jboss-seam-2.0.0.GA\examples\jee5\booking\dist\jboss-seam-jee5.ear

BUILD SUCCESSFUL
Total time: 7 seconds

The plan

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

jboss-seam-jee5-geronimo-plan.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
  <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <moduleId>
      <groupId>org.jboss.seam.examples.jee5</groupId>
      <artifactId>jboss-seam-jee5</artifactId>
      <version>2.0.0.GA</version>
      <type>ear</type>
    </moduleId>
    <dependencies>
      <dependency>
        <groupId>org.apache.geronimo.hibernate.transaction</groupId>
        <artifactId>geronimo-hibernate-transaction-manager-lookup</artifactId>
        <type>jar</type>
      </dependency>
    </dependencies>
  </environment>
  <module>
    <web>jboss-seam-jee5.war</web>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
      <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
          <groupId>org.jboss.seam.examples.jee5</groupId>
          <artifactId>jboss-seam-jee5</artifactId>
          <version>2.0.0.GA</version>
          <type>war</type>
        </moduleId>
      </environment>
      <context-root>/seam-jee5</context-root>
    </web-app>
  </module>
  <module>
    <ejb>jboss-seam-jee5.jar</ejb>
    <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
      <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
          <groupId>org.jboss.seam.examples.jee5</groupId>
          <artifactId>jboss-seam-jee5</artifactId>
          <version>2.0.0.GA</version>
          <type>jar</type>
        </moduleId>
      </environment>
      <!-- overrides what's in the module's persistence.xml -->
      <persistence xmlns="http://java.sun.com/xml/ns/persistence">
        <persistence-unit name="bookingDatabase">
          <jta-data-source>jdbc/__default</jta-data-source>
          <class>org.jboss.seam.example.booking.Booking</class>
          <class>org.jboss.seam.example.booking.Hotel</class>
          <class>org.jboss.seam.example.booking.User</class>
          <exclude-unlisted-classes>true</exclude-unlisted-classes>
          <properties>
            <property name="hibernate.transaction.manager_lookup_class"
              value="org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup" />
          </properties>
        </persistence-unit>
        <!-- change the way the default PU works - make it an alias to bookingDatabase PU -->
        <persistence-unit name="cmp">
          <class>org.jboss.seam.example.booking.Booking</class>
          <class>org.jboss.seam.example.booking.Hotel</class>
          <class>org.jboss.seam.example.booking.User</class>
          <exclude-unlisted-classes>true</exclude-unlisted-classes>
        </persistence-unit>
      </persistence>
    </openejb-jar>
  </module>
  <ext-module>
    <connector>seam-jee5-dbpool</connector>
    <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
      <dep:groupId>org.tranql</dep:groupId>
      <dep:artifactId>tranql-connector-derby-embed-xa</dep:artifactId>
      <dep:type>rar</dep:type>
    </external-path>
    <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
      <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
          <groupId>org.jboss.seam.examples.jee5</groupId>
          <artifactId>booking-dbpool</artifactId>
          <version>2.0.0.GA</version>
          <type>rar</type>
        </moduleId>
        <dependencies>
          <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>system-database</artifactId>
            <type>car</type>
          </dependency>
        </dependencies>
      </environment>
      <resourceadapter>
        <outbound-resourceadapter>
          <connection-definition>
            <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
            <connectiondefinition-instance>
              <name>jdbc/__default</name>
              <config-property-setting name="DatabaseName">SystemDatabase</config-property-setting>
              <connectionmanager>
                <local-transaction />
                <single-pool>
                  <max-size>100</max-size>
                  <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                  <select-one-assume-match />
                </single-pool>
              </connectionmanager>
            </connectiondefinition-instance>
          </connection-definition>
        </outbound-resourceadapter>
      </resourceadapter>
    </connector>
  </ext-module>
</application>

Starting Geronimo

Type it in on the command line.

jlaskowski@dev /cygdrive/c/geronimo
$ ./bin/geronimo.sh run -vv
Using GERONIMO_BASE:   c:\geronimo
Using GERONIMO_HOME:   c:\geronimo
Using GERONIMO_TMPDIR: c:\geronimo\var\temp
Using JRE_HOME:        c:\apps\java5\jre
...
Geronimo startup complete

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.

jlaskowski@dev /cygdrive/c/geronimo
$ ./bin/deploy.sh -u system -p manager deploy jboss-seam-jee5.ear jboss-seam-jee5-geronimo-plan.xml
Using GERONIMO_BASE:   c:\geronimo
Using GERONIMO_HOME:   c:\geronimo
Using GERONIMO_TMPDIR: c:\geronimo\var\temp
Using JRE_HOME:        c:\apps\java5\jre
    Deployed org.jboss.seam.examples.jee5/jboss-seam-jee5/2.0.0.GA/ear
      `-> jboss-seam-jee5.war @ /seam-jee5
      `-> jboss-seam.jar
      `-> jboss-seam-jee5.jar
      `-> seam-jee5-dbpool

The Geronimo console shows deployment progress as follows:

13:54:17,671 INFO  [config] Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
13:54:17,671 INFO  [config] Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container)
13:54:17,671 INFO  [config] Configuring Service(id=Default BMP Container, type=Container, provider-id=Default BMP Container)
13:54:17,687 INFO  [config] Configuring Service(id=Default CMP Container, type=Container, provider-id=Default CMP Container)
13:54:17,687 INFO  [config] Configuring app: org.jboss.seam.examples.jee5/jboss-seam-jee5/2.0.0.GA/ear
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb AuthenticatorAction: EjbDeployment(deployment-id=jboss-seam-jee5.jar/AuthenticatorAction)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb BookingListAction: EjbDeployment(deployment-id=jboss-seam-jee5.jar/BookingListAction)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb ChangePasswordAction: EjbDeployment(deployment-id=jboss-seam-jee5.jar/ChangePasswordAction)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb HotelBookingAction: EjbDeployment(deployment-id=jboss-seam-jee5.jar/HotelBookingAction)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb HotelSearchingAction: EjbDeployment(deployment-id=jboss-seam-jee5.jar/HotelSearchingAction)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb RegisterAction: EjbDeployment(deployment-id=jboss-seam-jee5.jar/RegisterAction)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb TimerServiceDispatcher: EjbDeployment(deployment-id=jboss-seam.jar/TimerServiceDispatcher)
13:54:29,515 INFO  [OpenEJB] Auto-deploying ejb EjbSynchronizations: EjbDeployment(deployment-id=jboss-seam.jar/EjbSynchronizations)
13:54:30,046 INFO  [config] Loaded Module: org.jboss.seam.examples.jee5/jboss-seam-jee5/2.0.0.GA/ear
13:54:38,812 INFO  [Version] Hibernate Annotations 3.3.0.GA
13:54:38,875 INFO  [Environment] Hibernate 3.2.4.sp1
13:54:38,968 INFO  [Environment] hibernate.properties not found
13:54:38,984 INFO  [Environment] Bytecode provider name : cglib
13:54:39,000 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
13:54:39,421 INFO  [Version] Hibernate EntityManager 3.3.1.GA
13:54:39,593 INFO  [Ejb3Configuration] Processing PersistenceUnitInfo [
        name: bookingDatabase
        ...]
13:54:39,593 ERROR [Ejb3Configuration] Container is providing a null PersistenceUnitRootUrl: discovery impossible
13:54:39,703 WARN  [Ejb3Configuration] Defining hibernate.transaction.flush_before_completion=true ignored in HEM
13:54:45,593 WARN  [Enhance] Detected the following possible violations of the restrictions placed on property access persistent types:
"org.jboss.seam.example.booking.Booking" uses property access, but its field "checkinDate" is accessed directly in method "getNights" defined in "org.jboss.seam.example.booking.Booking"
.
"org.jboss.seam.example.booking.Booking" uses property access, but its field "hotel" is accessed directly in method "getDescription" defined in "org.jboss.seam.example.booking.Booking".

"org.jboss.seam.example.booking.Booking" uses property access, but its field "hotel" is accessed directly in method "getDescription" defined in "org.jboss.seam.example.booking.Booking".

"org.jboss.seam.example.booking.Booking" uses property access, but its field "checkoutDate" is accessed directly in method "getNights" defined in "org.jboss.seam.example.booking.Booking
".
"org.jboss.seam.example.booking.Booking" uses property access, but its field "hotel" is accessed directly in method "getTotal" defined in "org.jboss.seam.example.booking.Booking".
"org.jboss.seam.example.booking.Booking" uses property access, but its field "user" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.Booking".
"org.jboss.seam.example.booking.Booking" uses property access, but its field "hotel" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.Booking".
13:54:45,750 WARN  [Enhance] Detected the following possible violations of the restrictions placed on property access persistent types:
"org.jboss.seam.example.booking.Hotel" uses property access, but its field "city" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.Hotel".
"org.jboss.seam.example.booking.Hotel" uses property access, but its field "name" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.Hotel".
"org.jboss.seam.example.booking.Hotel" uses property access, but its field "address" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.Hotel".
"org.jboss.seam.example.booking.Hotel" uses property access, but its field "zip" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.Hotel".
13:54:45,796 WARN  [Enhance] Detected the following possible violations of the restrictions placed on property access persistent types:
"org.jboss.seam.example.booking.User" uses property access, but its field "username" is accessed directly in method "toString" defined in "org.jboss.seam.example.booking.User".
13:54:46,062 INFO  [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.booking.Booking
13:54:46,281 INFO  [EntityBinder] Bind entity org.jboss.seam.example.booking.Booking on table Booking
13:54:46,593 INFO  [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.booking.Hotel
13:54:46,593 INFO  [EntityBinder] Bind entity org.jboss.seam.example.booking.Hotel on table Hotel
13:54:46,593 INFO  [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.booking.User
13:54:46,593 INFO  [EntityBinder] Bind entity org.jboss.seam.example.booking.User on table Customer
13:54:46,968 INFO  [Version] Hibernate Validator 3.0.0.GA
13:54:47,406 INFO  [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
13:54:47,421 INFO  [InjectedDataSourceConnectionProvider] Using provided datasource
13:54:47,437 INFO  [SettingsFactory] RDBMS: Apache Derby, version: 10.3.1.4 - (561794)
13:54:47,437 INFO  [SettingsFactory] JDBC driver: Apache Derby Embedded JDBC Driver, version: 10.3.1.4 - (561794)
13:54:47,546 INFO  [Dialect] Using dialect: org.hibernate.dialect.DerbyDialect
13:54:47,578 INFO  [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
13:54:47,593 INFO  [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup
13:54:47,609 INFO  [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
13:54:47,609 INFO  [SettingsFactory] Automatic flush during beforeCompletion(): disabled
13:54:47,609 INFO  [SettingsFactory] Automatic session close at end of transaction: disabled
13:54:47,609 INFO  [SettingsFactory] Scrollable result sets: enabled
13:54:47,609 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
13:54:47,609 INFO  [SettingsFactory] Connection release mode: auto
13:54:47,609 INFO  [SettingsFactory] Default batch fetch size: 1
13:54:47,609 INFO  [SettingsFactory] Generate SQL with comments: disabled
13:54:47,609 INFO  [SettingsFactory] Order SQL updates by primary key: disabled
13:54:47,609 INFO  [SettingsFactory] Order SQL inserts for batching: disabled
13:54:47,609 INFO  [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
13:54:47,625 INFO  [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
13:54:47,625 INFO  [SettingsFactory] Query language substitutions: {}
13:54:47,625 INFO  [SettingsFactory] JPA-QL strict compliance: enabled
13:54:47,625 INFO  [SettingsFactory] Second-level cache: enabled
13:54:47,625 INFO  [SettingsFactory] Query cache: disabled
13:54:47,625 INFO  [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
13:54:47,640 INFO  [SettingsFactory] Optimize cache for minimal puts: disabled
13:54:47,640 INFO  [SettingsFactory] Structured second-level cache entries: disabled
13:54:47,671 INFO  [SettingsFactory] Echoing all SQL to stdout
13:54:47,671 INFO  [SettingsFactory] Statistics: disabled
13:54:47,671 INFO  [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
13:54:47,687 INFO  [SettingsFactory] Default entity-mode: pojo
13:54:47,687 INFO  [SettingsFactory] Named query checking : enabled
13:54:48,359 INFO  [SessionFactoryImpl] building session factory
13:54:49,187 INFO  [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
13:54:49,218 INFO  [SchemaExport] Running hbm2ddl schema export
13:54:49,250 INFO  [SchemaExport] exporting generated schema to database
13:54:51,359 INFO  [SchemaExport] Executing import script: /import.sql
13:54:52,234 INFO  [SchemaExport] schema export complete
13:54:52,343 INFO  [startup] Assembling app: c:\geronimo\var\temp\geronimo-deploymentUtil42931.jar
13:54:52,562 INFO  [startup] Jndi(name=AuthenticatorActionLocal) --> Ejb(deployment-id=jboss-seam-jee5.jar/AuthenticatorAction)
13:54:52,562 INFO  [startup] Jndi(name=BookingListActionLocal) --> Ejb(deployment-id=jboss-seam-jee5.jar/BookingListAction)
13:54:52,562 INFO  [startup] Jndi(name=ChangePasswordActionLocal) --> Ejb(deployment-id=jboss-seam-jee5.jar/ChangePasswordAction)
13:54:52,562 INFO  [startup] Jndi(name=HotelBookingActionLocal) --> Ejb(deployment-id=jboss-seam-jee5.jar/HotelBookingAction)
13:54:52,562 INFO  [startup] Jndi(name=HotelSearchingActionLocal) --> Ejb(deployment-id=jboss-seam-jee5.jar/HotelSearchingAction)
13:54:52,562 INFO  [startup] Jndi(name=RegisterActionLocal) --> Ejb(deployment-id=jboss-seam-jee5.jar/RegisterAction)
13:54:52,562 INFO  [startup] Created Ejb(deployment-id=jboss-seam-jee5.jar/AuthenticatorAction, ejb-name=AuthenticatorAction, container=Default Stateless Container)
13:54:52,562 INFO  [startup] Created Ejb(deployment-id=jboss-seam-jee5.jar/BookingListAction, ejb-name=BookingListAction, container=Default Stateful Container)
13:54:52,562 INFO  [startup] Created Ejb(deployment-id=jboss-seam-jee5.jar/ChangePasswordAction, ejb-name=ChangePasswordAction, container=Default Stateful Container)
13:54:52,562 INFO  [startup] Created Ejb(deployment-id=jboss-seam-jee5.jar/HotelBookingAction, ejb-name=HotelBookingAction, container=Default Stateful Container)
13:54:52,578 INFO  [startup] Created Ejb(deployment-id=jboss-seam-jee5.jar/HotelSearchingAction, ejb-name=HotelSearchingAction, container=Default Stateful Container)
13:54:52,578 INFO  [startup] Created Ejb(deployment-id=jboss-seam-jee5.jar/RegisterAction, ejb-name=RegisterAction, container=Default Stateful Container)
13:54:52,578 INFO  [startup] Deployed Application(path=c:\geronimo\var\temp\geronimo-deploymentUtil42931.jar)
13:54:52,625 INFO  [startup] Assembling app: c:\geronimo\var\temp\geronimo-deploymentUtil42932.jar
13:54:52,718 INFO  [startup] Jndi(name=TimerServiceDispatcherLocal) --> Ejb(deployment-id=jboss-seam.jar/TimerServiceDispatcher)
13:54:52,718 INFO  [startup] Jndi(name=EjbSynchronizationsLocal) --> Ejb(deployment-id=jboss-seam.jar/EjbSynchronizations)
13:54:52,750 INFO  [startup] Created Ejb(deployment-id=jboss-seam.jar/TimerServiceDispatcher, ejb-name=TimerServiceDispatcher, container=Default Stateless Container)
13:54:52,750 INFO  [startup] Created Ejb(deployment-id=jboss-seam.jar/EjbSynchronizations, ejb-name=EjbSynchronizations, container=Default Stateful Container)
13:54:52,765 INFO  [startup] Deployed Application(path=c:\geronimo\var\temp\geronimo-deploymentUtil42932.jar)
13:54:53,078 INFO  [ServletContextListener] Welcome to Seam 2.0.0.GA
13:54:53,140 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.war/WEB-INF/lib/jboss-s
eam-ui.jar
13:54:53,140 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam.jar
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/international, package: org.jboss.seam.international, prefix: org.jboss.seam.international
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security, prefix: org.jboss.seam.security
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/persistence, package: org.jboss.seam.persistence, prefix: org.jboss.seam.persistence
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/core, package: org.jboss.seam.core, prefix: org.jboss.seam.core
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/async, package: org.jboss.seam.async, prefix: org.jboss.seam.async
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: org.jboss.seam.drools
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/mail, package: org.jboss.seam.mail, prefix: org.jboss.seam.mail
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/transaction, package: org.jboss.seam.transaction, prefix: org.jboss.seam.transaction
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/web, package: org.jboss.seam.web, prefix: org.jboss.seam.web
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: org.jboss.seam.theme
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/navigation, package: org.jboss.seam.navigation, prefix: org.jboss.seam.navigation
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/bpm, package: org.jboss.seam.bpm, prefix: org.jboss.seam.bpm
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, prefix: org.jboss.seam.core.framework
13:54:53,218 INFO  [Initialization] Namespace: http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: org.jboss.seam.jms
13:54:53,218 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.war/WEB-INF/lib/jboss-s
eam-debug.jar
13:54:53,218 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.jar
13:54:53,234 INFO  [Initialization] reading /WEB-INF/components.xml
13:54:54,046 INFO  [Initialization] reading jar:file:/C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam.jar!/META-INF/
components.xml
13:54:54,140 INFO  [Initialization] reading jar:file:/C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.war/WEB-I
NF/lib/jboss-seam-ui.jar!/META-INF/components.xml
13:54:54,296 INFO  [Initialization] reading properties from: /seam.properties
13:54:54,578 INFO  [Initialization] initializing Seam
13:54:54,718 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.war/WEB-INF/lib/jboss-s
eam-debug.jar
13:54:55,500 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.jar
13:54:56,640 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam-jee5.war/WEB-INF/lib/jboss-s
eam-ui.jar
13:55:09,562 INFO  [Scanner] scanning: /C:/geronimo/repository/org/jboss/seam/examples/jee5/jboss-seam-jee5/2.0.0.GA/jboss-seam-jee5-2.0.0.GA.ear/jboss-seam.jar
13:55:41,984 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale
13:55:42,000 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.userPrincipal
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.bpm.businessProcess
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.manager
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.expressions
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.security.identity
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.transaction.synchronizations
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.resourceLoader
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.parameters
13:55:42,015 INFO  [Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.isUserInRole
13:55:42,484 INFO  [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
13:55:42,640 INFO  [Initialization] Installing components...
13:55:42,718 INFO  [Component] Component: authenticator, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: org.jboss.seam.example.booking.AuthenticatorAction, JNDI: java:comp/env/j
boss-seam-jee5/AuthenticatorAction/local
13:55:42,843 INFO  [Component] Component: booking, scope: CONVERSATION, type: ENTITY_BEAN, class: org.jboss.seam.example.booking.Booking
13:55:42,843 INFO  [Component] Component: bookingList, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.BookingListAction, JNDI: java:comp/env/jboss-se
am-jee5/BookingListAction/local
13:55:42,890 INFO  [Component] Component: changePassword, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.ChangePasswordAction, JNDI: java:comp/env/jbos
s-seam-jee5/ChangePasswordAction/local
13:55:42,906 INFO  [Component] Component: hotel, scope: CONVERSATION, type: ENTITY_BEAN, class: org.jboss.seam.example.booking.Hotel
13:55:42,921 INFO  [Component] Component: hotelBooking, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.HotelBookingAction, JNDI: java:comp/env/j
boss-seam-jee5/HotelBookingAction/local
13:55:42,937 INFO  [Component] Component: hotelSearch, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.HotelSearchingAction, JNDI: java:comp/env/jboss
-seam-jee5/HotelSearchingAction/local
13:55:43,359 INFO  [Component] Component: org.jboss.seam.async.dispatcher, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.async.ThreadPoolDispatcher
13:55:43,781 INFO  [Component] Component: org.jboss.seam.core.contexts, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Contexts
13:55:44,203 INFO  [Component] Component: org.jboss.seam.core.conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
13:55:44,625 INFO  [Component] Component: org.jboss.seam.core.conversationEntries, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationEntries
13:55:45,031 INFO  [Component] Component: org.jboss.seam.core.conversationListFactory, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationList
13:55:45,421 INFO  [Component] Component: org.jboss.seam.core.conversationPropagation, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationPropagation
13:55:45,859 INFO  [Component] Component: org.jboss.seam.core.conversationStackFactory, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
13:55:46,250 INFO  [Component] Component: org.jboss.seam.core.events, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Events
13:55:46,671 INFO  [Component] Component: org.jboss.seam.core.expressions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.faces.FacesExpressions
13:55:47,078 INFO  [Component] Component: org.jboss.seam.core.interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
13:55:47,484 INFO  [Component] Component: org.jboss.seam.core.locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.international.Locale
13:55:47,890 INFO  [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.faces.FacesManager
13:55:48,281 INFO  [Component] Component: org.jboss.seam.core.resourceBundle, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle
13:55:49,250 INFO  [Component] Component: org.jboss.seam.core.resourceLoader, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.faces.ResourceLoader
13:55:49,687 INFO  [Component] Component: org.jboss.seam.core.validators, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Validators
13:55:50,203 INFO  [Component] Component: org.jboss.seam.debug.contexts, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.debug.Contexts
13:55:50,750 INFO  [Component] Component: org.jboss.seam.debug.hotDeployFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.debug.hot.HotDeployFilter
13:55:51,437 INFO  [Component] Component: org.jboss.seam.debug.introspector, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.debug.Introspector
13:55:51,906 INFO  [Component] Component: org.jboss.seam.exception.exceptions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.exception.Exceptions
13:55:52,328 INFO  [Component] Component: org.jboss.seam.faces.dataModels, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.faces.DataModels
13:55:52,765 INFO  [Component] Component: org.jboss.seam.faces.facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.faces.FacesContext
13:55:53,171 INFO  [Component] Component: org.jboss.seam.faces.facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.faces.FacesMessages
13:55:53,562 INFO  [Component] Component: org.jboss.seam.faces.facesPage, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.faces.FacesPage
13:55:53,984 INFO  [Component] Component: org.jboss.seam.faces.httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.faces.HttpError
13:55:54,359 INFO  [Component] Component: org.jboss.seam.faces.redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.faces.Redirect
13:55:54,921 INFO  [Component] Component: org.jboss.seam.faces.renderer, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.ui.facelet.FaceletsRenderer
13:55:55,359 INFO  [Component] Component: org.jboss.seam.faces.switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.faces.Switcher
13:55:55,781 INFO  [Component] Component: org.jboss.seam.faces.uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.faces.UiComponent
13:55:56,343 INFO  [Component] Component: org.jboss.seam.faces.validation, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.faces.Validation
13:55:56,734 INFO  [Component] Component: org.jboss.seam.framework.currentDate, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.CurrentDate
13:55:57,171 INFO  [Component] Component: org.jboss.seam.framework.currentDatetime, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.CurrentDatetime
13:55:57,578 INFO  [Component] Component: org.jboss.seam.framework.currentTime, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.CurrentTime
13:55:58,312 INFO  [Component] Component: org.jboss.seam.graphicImage.image, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.ui.graphicImage.Image
13:55:58,718 INFO  [Component] Component: org.jboss.seam.international.localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.international.LocaleSelector
13:55:59,140 INFO  [Component] Component: org.jboss.seam.international.messagesFactory, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.international.Messages
13:55:59,546 INFO  [Component] Component: org.jboss.seam.international.timeZone, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.international.TimeZone
13:55:59,968 INFO  [Component] Component: org.jboss.seam.international.timeZoneSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.international.TimeZoneSelector
13:56:00,375 INFO  [Component] Component: org.jboss.seam.mail.mailSession, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.mail.MailSession
13:56:00,828 INFO  [Component] Component: org.jboss.seam.navigation.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.navigation.Pages
13:56:01,250 INFO  [Component] Component: org.jboss.seam.navigation.safeActions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.navigation.SafeActions
13:56:01,656 INFO  [Component] Component: org.jboss.seam.persistence.persistenceContexts, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.persistence.PersistenceContexts
13:56:02,078 INFO  [Component] Component: org.jboss.seam.persistence.persistenceProvider, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.persistence.HibernatePersistenceProvid
er
13:56:02,484 INFO  [Component] Component: org.jboss.seam.security.configurationFactory, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.security.Configuration
13:56:02,890 INFO  [Component] Component: org.jboss.seam.security.identity, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.security.Identity
13:56:03,296 INFO  [Component] Component: org.jboss.seam.theme.themeFactory, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.theme.Theme
13:56:03,703 INFO  [Component] Component: org.jboss.seam.theme.themeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.ThemeSelector
13:56:04,125 INFO  [Component] Component: org.jboss.seam.transaction.ejbTransaction, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.transaction.EjbTransaction
13:56:04,125 INFO  [Component] Component: org.jboss.seam.transaction.synchronizations, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.transaction.EjbSynchronizations,
JNDI: java:comp/env/jboss-seam-jee5/EjbSynchronizations/local
13:56:04,515 INFO  [Component] Component: org.jboss.seam.transaction.transaction, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.transaction.Transaction
13:56:05,062 INFO  [Component] Component: org.jboss.seam.ui.EntityConverter, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.ui.converter.EntityConverter
13:56:05,625 INFO  [Component] Component: org.jboss.seam.ui.entityConverterStore, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.ui.converter.EntityConverterStore
13:56:06,187 INFO  [Component] Component: org.jboss.seam.ui.graphicImage.graphicImageResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.ui.graphicImage.GraphicImageRes
ource
13:56:06,703 INFO  [Component] Component: org.jboss.seam.ui.graphicImage.graphicImageStore, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.ui.graphicImage.GraphicImageStore
13:56:07,250 INFO  [Component] Component: org.jboss.seam.ui.resource.styleResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.ui.resource.StyleResource
13:56:07,812 INFO  [Component] Component: org.jboss.seam.ui.resource.webResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.ui.resource.WebResource
13:56:08,218 INFO  [Component] Component: org.jboss.seam.web.ajax4jsfFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Ajax4jsfFilter
13:56:08,750 INFO  [Component] Component: org.jboss.seam.web.ajax4jsfFilterInstantiator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.ui.filter.Ajax4jsfFilterInstantiator
13:56:09,156 INFO  [Component] Component: org.jboss.seam.web.exceptionFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.ExceptionFilter
13:56:09,578 INFO  [Component] Component: org.jboss.seam.web.isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.faces.IsUserInRole
13:56:09,984 INFO  [Component] Component: org.jboss.seam.web.loggingFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.LoggingFilter
13:56:10,406 INFO  [Component] Component: org.jboss.seam.web.multipartFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.MultipartFilter
13:56:10,812 INFO  [Component] Component: org.jboss.seam.web.parameters, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.faces.Parameters
13:56:11,250 INFO  [Component] Component: org.jboss.seam.web.redirectFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.RedirectFilter
13:56:11,656 INFO  [Component] Component: org.jboss.seam.web.servletContexts, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.web.ServletContexts
13:56:12,046 INFO  [Component] Component: org.jboss.seam.web.session, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.web.Session
13:56:12,437 INFO  [Component] Component: org.jboss.seam.web.userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.faces.UserPrincipal
13:56:12,437 INFO  [Component] Component: register, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.RegisterAction, JNDI: java:comp/env/jboss-seam-jee5/
RegisterAction/local
13:56:12,437 INFO  [Component] Component: user, scope: SESSION, type: ENTITY_BEAN, class: org.jboss.seam.example.booking.User
13:56:12,437 INFO  [Contexts] starting up: org.jboss.seam.ui.resource.styleResource
13:56:12,437 INFO  [Contexts] starting up: org.jboss.seam.ui.graphicImage.graphicImageResource
13:56:12,453 INFO  [Contexts] starting up: org.jboss.seam.ui.resource.webResource
13:56:12,453 INFO  [Initialization] done initializing Seam
13:56:12,703 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
13:56:12,703 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
13:56:12,703 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
13:56:12,703 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
13:56:12,703 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
13:56:12,703 INFO  [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
13:56:12,703 INFO  [MyfacesConfig] Starting up Tomahawk on the MyFaces-JSF-Implementation
13:56:20,328 INFO  [DefaultFacesInitializer] ServletContext 'C:\geronimo\repository\org\jboss\seam\examples\jee5\jboss-seam-jee5\2.0.0.GA\jboss-seam-jee5-2.0.0.GA.ear\jboss-seam-jee5.wa
r\' initialized.
13:56:20,500 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.loggingFilter
13:56:20,500 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.ajax4jsfFilter
13:56:20,687 INFO  [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
13:56:20,687 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
13:56:20,687 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
13:56:20,937 INFO  [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
13:56:20,937 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
13:56:20,937 INFO  [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
13:56:20,937 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.redirectFilter
13:56:20,937 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.exceptionFilter
13:56:20,937 INFO  [SeamFilter] Initializing filter: org.jboss.seam.web.multipartFilter
13:56:20,937 INFO  [SeamFilter] Initializing filter: org.jboss.seam.debug.hotDeployFilter

Running the webapp

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

Let's register a new user.

and finally search for some hotels to book.

  • No labels