// Resume outer transaction after inner transaction begin failed.
 private void ResumeAfterBeginException(object transaction, SuspendedResourcesHolder suspendedResources, Exception beginEx)
 {
     var exceptionMessage = "Inner transaction begin exception overridden by outer transaction resume exception";
     try
     {
         this.Resume(transaction, suspendedResources);
     }
     catch (Exception resumeEx)
     {
         Logger.Error(exceptionMessage, beginEx);
         throw;
     }
 }
        /**
         * Resume the given transaction. Delegates to the <code>doResume</code>
         * template method first, then resuming transaction synchronization.
         * @param transaction the current transaction object
         * @param resourcesHolder the object that holds suspended resources,
         * as returned by <code>suspend</code> (or <code>null</code> to just
         * resume synchronizations, if any)
         * @see #doResume
         * @see #suspend
         */

        /// <summary>The resume.</summary>
        /// <param name="transaction">The transaction.</param>
        /// <param name="resourcesHolder">The resources holder.</param>
        protected void Resume(object transaction, SuspendedResourcesHolder resourcesHolder)
        {
            if (resourcesHolder != null)
            {
                object suspendedResources = resourcesHolder.suspendedResources;
                if (suspendedResources != null)
                {
                    this.DoResume(transaction, suspendedResources);
                }

                var suspendedSynchronizations = resourcesHolder.suspendedSynchronizations;
                if (suspendedSynchronizations != null)
                {
                    TransactionSynchronizationManager.ActualTransactionActive = resourcesHolder.wasActive;
                    TransactionSynchronizationManager.CurrentTransactionIsolationLevel = resourcesHolder.isolationLevel;
                    TransactionSynchronizationManager.CurrentTransactionReadOnly = resourcesHolder.readOnly;
                    TransactionSynchronizationManager.CurrentTransactionName = resourcesHolder.name;
                    this.DoResumeSynchronization(suspendedSynchronizations);
                }
            }
        }