## org.springframework.transaction.jta
Interface TransactionFactory

All Known Implementing Classes:
  JtaTransactionManager, OC4JJtaTransactionManager, SimpleTransactionFactory, WebLogicJtaTransactionManager, WebSphereUowTransactionManager

    public interface TransactionFactory

Strategy interface for creating JTA `Transaction` objects based on specified transactional characteristics.

The default implementation, `SimpleTransactionFactory`, simply wraps a standard JTA `TransactionManager`. This strategy interface allows for more sophisticated implementations that adapt to vendor-specific JTA extensions.

Since:
  2.5
Author:
  Juergen Hoeller
See Also:
  `TransactionManager.getTransaction()`, `SimpleTransactionFactory`, `JtaTransactionManager`

Method Summary
`Transaction` `createTransaction(String name, int timeout)` Create an active Transaction object based on the given name and timeout.

Method Detail

### createTransaction

    Transaction createTransaction(String name,
                                  int timeout)
                                  throws NotSupportedException,
                                         SystemException

  Create an active Transaction object based on the given name and timeout.

  Parameters:
    `name` - the transaction name (may be `null`)
    `timeout` - the transaction timeout (may be -1 for the default timeout)
  Returns:
    the active Transaction object (never `null`)
  Throws:
    `NotSupportedException` - if the transaction manager does not support a transaction of the specified type
    `SystemException` - if the transaction managed failed to create the transaction

Copyright © 2002-2008 The Spring Framework.