org.springframework.ldap.transaction.compensating.manager

## Class TransactionAwareDirContextInvocationHandler

- java.lang.Object
- - org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler

- All Implemented Interfaces:
    InvocationHandler

      public class TransactionAwareDirContextInvocationHandler
      extends Object
      implements InvocationHandler

  Proxy implementation for DirContext, making sure that the instance is not closed during a transaction, and that all modifying operations are recorded, storing compensating rollback operations for them.
  Since:
    1.2
  Author:
    Mattias Hellborg Arthursson

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransactionAwareDirContextInvocationHandler(DirContext target, ContextSource contextSource)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `invoke(Object proxy, Method method, Object[] args)`

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

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

- - ### Constructor Detail

    - #### TransactionAwareDirContextInvocationHandler

          public TransactionAwareDirContextInvocationHandler(DirContext target,
                                                             ContextSource contextSource)

      Constructor.
      Parameters:
        `target` - The target DirContext.
        `contextSource` - The transactional ContextSource, needed to get hold of the current transaction's `DirContextHolder`.

  - ### Method Detail

    - #### invoke

          public Object invoke(Object proxy,
                               Method method,
                               Object[] args)
                        throws Throwable

      Specified by:
        `invoke` in interface `InvocationHandler`
      Throws:
        `Throwable`