Versions Compared

Key

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

...

These properties are common to any application server including Apache Geronimo v2.01.

However, JBoss (more specifically the Hibernate MBean) provides two additional deployment mechanisms.

...

Feature

Apache Geronimo v2.0 1

JBoss v4.2.1

Container-managed datasource

Supported. Hibernate is able to use a datasource given its JNDI name. This is because it is running in the same thread as the application.

Supported. Hibernate can lookup a datasource from JNDI given its JNDI name.

Automatic JNDI binding

Not Supported.

Supported. Once the property is set the session factory is bound to the JNDI context.

JTA Session binding

This feature is not supported out of the box. We need to write a lookup for the Geronimo Transaction Manager to enable this.

Supported out of the Box. Hibernate provides a lookup class for the JBoss Transaction Manager.

JMX deployment

Not Supported out of the box. Can be implemented by writing a GBean and a Hibernate Connection Provider class.

Supported. Hibernate is distributed with org.hibernate.jmx.HibernateService which can be deployed on JBoss.

Hibernate Archive (HAR)

Not Supported. Hibernate classes are deployed as a part of the J2EE archives.

Supported. A HAR packages the configuration and mapping files enabling extra server support to deployment.

Caching

You can use caching mechanisms provided by hibernate.

You can use caching mechanisms provided by hibernate. Integration with JBoss Cache is also supported.

Session Management

Not Supported. It is required to manually open sessions. Only the transaction needs to be closed.

The Hibernate Session's lifecycle can be automatically bound to the scope of a
JTA transaction. This means you no longer have to manually open and close the Session, this becomes the job of a JBoss EJB interceptor.

Hibernate Mapping Files

We need to specify the locations of the Hibernate mapping files.

If we use HAR deployment JBoss will automatically lookup the Hibernate mapping files.

...