Reflector is showing that TransactionalAspect is now applied on all methods automatically. (It was not in 4.2)

Can you confirm: * This is for all persistent types (inheriting from Entity) * This is for all methods of those types (static or not, private, ...)

This is a big change from 4.2. Is this a feature or not voluntary?

Anyway we need a way to control this. This may be a good default, but how do I override this behavior if I want to create a non-transactional method?

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked May 18 '10 at 12:22

olorin's gravatar image


One Answer:

Dmitri Maximov (Xtensive) wrote:

As we were targeted PostSharp 2 in DataObjects.Net 4.3, it was a good time to rewrite our persistent aspects. And we did so, making them faster, simpler and more adequate. So, yes, this was an intentional change.

As for Transactional aspect, it is applied automatically to all members of SessionBound class inheritors whenever they are public or private, methods or properties. Moreover, it can be used with other types (non SessionBound descendants) and even static ones by manual application of the attribute on the desired class or member.

In order to stop a member from being a transactional one you can use NonTransactional attribute. This can be applied for members only.

Hope that helps.

Alex (Xtensive) wrote:

Sorry for disinformation, the described behavior is almost 100% a mistake - we just discussed this.

Most likely, we'll return back to old case (only public methods will be transactional by default) ASAP, although we consider allow you to override this on class level.

Btw, there are some other mistakes related to application of aspects in this version. E.g. [Infrastructure] is ignored by [Transacitonal] - this affects on performance (the same is about application of these aspects to private\internal methods). So tomorrow we'll discuss the changes, implement them and publish a new update.

answered May 18 '10 at 13:40

Editor's gravatar image


olorin wrote: This is perfect :)

I didn't see this one : I will try it ASAP.

Thank you very much!

(May 18 '10 at 13:40) Editor Editor's gravatar image

You are welcome =)

(May 18 '10 at 13:40) Dmitri Maximov Dmitri%20Maximov's gravatar image

olorin wrote: Yes there is indeed a performance hit.

I'm waiting for your new build : could you notify us in this forum when the changes are available in a nightly build / new release?

Thanks for the precisions.

(May 18 '10 at 13:40) Editor Editor's gravatar image

Sure, will do.

(May 18 '10 at 13:40) Dmitri Maximov Dmitri%20Maximov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: May 18 '10 at 12:22

Seen: 10,216 times

Last updated: May 18 '10 at 12:22

powered by OSQA