private static readonly bool aopAvailable = true; // ClassUtils.isPresent("org.springframework.aop.scope.ScopedObject", TransactionSynchronizationUtils.class.getClassLoader());

        /**
         * Check whether the given resource transaction managers refers to the given
         * (underlying) resource factory.
         * @see ResourceTransactionManager#getResourceFactory()
         * @see org.springframework.core.InfrastructureProxy#getWrappedObject()
         */

        /// <summary>The same resource factory.</summary>
        /// <param name="tm">The tm.</param>
        /// <param name="resourceFactory">The resource factory.</param>
        /// <returns>The System.Boolean.</returns>
        public static bool SameResourceFactory(IResourceTransactionManager tm, object resourceFactory) { return UnwrapResourceIfNecessary(tm.ResourceFactory).Equals(UnwrapResourceIfNecessary(resourceFactory)); }
        private static readonly bool aopAvailable = true; // ClassUtils.isPresent("org.springframework.aop.scope.ScopedObject", TransactionSynchronizationUtils.class.getClassLoader());

        /**
         * Check whether the given resource transaction managers refers to the given
         * (underlying) resource factory.
         * @see ResourceTransactionManager#getResourceFactory()
         * @see org.springframework.core.InfrastructureProxy#getWrappedObject()
         */

        /// <summary>The same resource factory.</summary>
        /// <param name="tm">The tm.</param>
        /// <param name="resourceFactory">The resource factory.</param>
        /// <returns>The System.Boolean.</returns>
        public static bool SameResourceFactory(IResourceTransactionManager tm, object resourceFactory)
        {
            return(UnwrapResourceIfNecessary(tm.ResourceFactory).Equals(UnwrapResourceIfNecessary(resourceFactory)));
        }