org.axonframework.unitofwork
Class DefaultUnitOfWorkFactory

java.lang.Object
  extended by org.axonframework.unitofwork.DefaultUnitOfWorkFactory
All Implemented Interfaces:
UnitOfWorkFactory

public class DefaultUnitOfWorkFactory
extends Object
implements UnitOfWorkFactory

UnitOfWorkFactory implementation that creates instances of the DefaultUnitOfWork.

Since:
0.7
Author:
Allard Buijze

Constructor Summary
DefaultUnitOfWorkFactory()
          Initializes the Unit of Work Factory to create Unit of Work that are not bound to any transaction.
DefaultUnitOfWorkFactory(TransactionManager transactionManager)
          Initializes the factory to create Unit of Work bound to transactions managed by the given transactionManager
 
Method Summary
 UnitOfWork createUnitOfWork()
          Creates a new UnitOfWork instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUnitOfWorkFactory

public DefaultUnitOfWorkFactory()
Initializes the Unit of Work Factory to create Unit of Work that are not bound to any transaction.


DefaultUnitOfWorkFactory

public DefaultUnitOfWorkFactory(TransactionManager transactionManager)
Initializes the factory to create Unit of Work bound to transactions managed by the given transactionManager

Parameters:
transactionManager - The transaction manager to manage the transactions for Unit Of Work created by this factory
Method Detail

createUnitOfWork

public UnitOfWork createUnitOfWork()
Description copied from interface: UnitOfWorkFactory
Creates a new UnitOfWork instance. The instance's UnitOfWork.isStarted() method returns true.

Specified by:
createUnitOfWork in interface UnitOfWorkFactory
Returns:
a new UnitOfWork instance, which has been started.


Copyright © 2010-2016. All Rights Reserved.