class TransactionAwareContextSourceProxy extends DelegatingBaseLdapPathContextSourceSupport implements ContextSource {

    @Override
    public DirContext getReadWriteContext() {
        DirContextHolder contextHolder = (DirContextHolder) TransactionSynchronizationManager
                .getResource(target);
        DirContext ctx = null;

        if (contextHolder != null) {
            ctx = contextHolder.getCtx();
        }

        if (ctx == null) {
            ctx = target.getReadWriteContext();
            if (contextHolder != null) {
                contextHolder.setCtx(ctx);
            }
        }
        return getTransactionAwareDirContextProxy(ctx, target);
    }

    public  TransactionAwareContextSourceProxy(ContextSource target);

}