Hi,

I've just found strange behaviour with AutoTx 2.0. If you are trying
to invoke virtual method without [Transaction] attribute which in turn
invokes method with [Transaction] then automatic transaction is not
working at all. Here you are reproducible example:

        [Test]
        public void NonTransactionalEnterTest()
        {
            _container.AddFacility("autotx", new
TransactionFacility());

            var tc = _container.Resolve<ITestClass>();
            tc.Test1();  // AutoTX is NOT invoked for Test2
            tc.Test2(); // AutoTX works perfectly
        }

    public interface ITestClass
    {
        void Test1();
        void Test2();

    }

    [Transactional]
    public class TestClass : ITestClass
    {
        public virtual void Test1()
        {
            Test2();
        }

        [Transaction]
        public virtual void Test2()
        {
        }
    }

Any ideas why it doesn't work?

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to