Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 7 Next »

h2: Overview

The HibernateUnitOfWorkListener is a UnitOfWorkListener that makes the Unit Of Work transaction work in conjunction with the Hibernate persistence service.

Hibernate is a powerful, ultra-high performance object/relational persistence and query service for Java

h2: Definition

You can define the HibernateUnitOfWorkListener in two ways, either using the SpringAspectContainer configuration file aware-config.xml or using a regular Java API.

h3: Java API

Specify the org.codehaus.aware.unitofwork.hibernate.HibernateUnitOfWorkListener class as one of the listeners in the Class array passed to the UnitOfWork.initialize() method.

h3: Spring definition

Specify the org.codehaus.aware.unitofwork.hibernate.HibernateUnitOfWorkListener class name as one of the listeners in the property listeners.

For the Spring definition to work you have to define the UnitOfWorkProtocol to use the SpringAspectContainer and not the default one.

  • No labels