Class TransactionAwareDirContextInvocationHandler

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

    public class TransactionAwareDirContextInvocationHandler
    extends java.lang.Object
    implements java.lang.reflect.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.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​(javax.naming.directory.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 java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable