org.modeshape.jcr.txn

## Class SynchronizedTransactions.SynchronizedTransaction

- java.lang.Object
- - org.modeshape.jcr.txn.Transactions.BaseTransaction
  - - org.modeshape.jcr.txn.SynchronizedTransactions.SynchronizedTransaction

- All Implemented Interfaces:
    SessionEnvironment.MonitorFactory, Transactions.Transaction
  Enclosing class:
    SynchronizedTransactions

      protected class SynchronizedTransactions.SynchronizedTransaction
      extends Transactions.BaseTransaction

- - ### Field Summary

    - ### Fields inherited from class org.modeshape.jcr.txn.Transactions.BaseTransaction

      `txnMgr`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SynchronizedTransactions.SynchronizedTransaction(TransactionManager txnMgr)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addUpdate(SynchronizedTransactions.WorkspaceUpdates updates)`
    `protected void` | `afterCommit()` Method called after the transaction has successfully completed via commit (not rollback).
    `void` | `commit()` Commit the transaction currently associated with the calling thread.
    `SessionEnvironment.Monitor` | `createMonitor()` Get a monitor that should be used to capture what has changed during this transaction.
    `void` | `rollback()` Rolls back the transaction currently associated with the calling thread.

    - ### Methods inherited from class org.modeshape.jcr.txn.Transactions.BaseTransaction

      `executeFunctions, uponCompletion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SynchronizedTransactions.SynchronizedTransaction

          protected SynchronizedTransactions.SynchronizedTransaction(TransactionManager txnMgr)
                                                              throws SystemException,
                                                                     RollbackException

      Throws:
        `SystemException`
        `RollbackException`

  - ### Method Detail

    - #### addUpdate

          protected void addUpdate(SynchronizedTransactions.WorkspaceUpdates updates)

    - #### commit

          public void commit()

      Description copied from interface: `Transactions.Transaction`
      Commit the transaction currently associated with the calling thread.

    - #### rollback

          public void rollback()

      Description copied from interface: `Transactions.Transaction`
      Rolls back the transaction currently associated with the calling thread.

    - #### afterCommit

          protected void afterCommit()

      Method called after the transaction has successfully completed via commit (not rollback). Override this method in subclasses to alter the behavior.

    - #### createMonitor

          public SessionEnvironment.Monitor createMonitor()

      Description copied from interface: `Transactions.Transaction`
      Get a monitor that should be used to capture what has changed during this transaction.
      Specified by:
        `createMonitor` in interface `SessionEnvironment.MonitorFactory`
      Specified by:
        `createMonitor` in interface `Transactions.Transaction`
      Overrides:
        `createMonitor` in class `Transactions.BaseTransaction`
      Returns:
        the monitor, or null if there is no monitoring

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.