Versions Compared

Key

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

...

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.

...

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

Code Block
java
java
UnitOfWork.initialize(new Class[]{HibernateUnitOfWorkListener.class});

...

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

Code Block
xml
xml
<bean id="org.codehaus.aware.unitofwork.UnitOfWorkProtocol"
     class="org.codehaus.aware.unitofwork.UnitOfWorkProtocol"
    singleton="false">

    <property name="listeners">
        <list>
            <value>org.codehaus.aware.unitofwork.hibernate.HibernateUnitOfWorkListener</value>
             ...
        </list>
    </property>

</bean>

...