ATM issue

5 views
Skip to first unread message

Germán Schuager

unread,
Mar 9, 2009, 9:55:43 PM3/9/09
to castle-pro...@googlegroups.com
Hi, I've a class like this:

        [Transactional]
        public class Comp : IComp
        {
            public void MethodA()
            {
                MethodB();
            }

            [Transaction(TransactionMode.Requires)]
            public void MethodB()
            {
                doSomething();
            }
        }

        public interface IComp
        {
            void MethodA();
            void MethodB();
        }

When MethodB is called everything is fine, but when MethodA is called, which in turn calls MethodB, the transaction is ignored.

I've just spent some time trying to realize what was going on; since MethodB has the Transaction attribute I was expecting it to start a transaction no matter from where am I calling it.

Is this a known issue?

hammett

unread,
Mar 9, 2009, 10:45:48 PM3/9/09
to castle-pro...@googlegroups.com
The proxy will be attached to the interface, not to the concrete
class.. so there will be no interception for the this pointer.

Germán Schuager

unread,
Mar 9, 2009, 10:54:12 PM3/9/09
to castle-pro...@googlegroups.com
I understand. Thank you.
Reply all
Reply to author
Forward
0 new messages