How does the transaction scope work? How does it know when there is another context being used already and how might I implement another kind of scope in my code.
I'm primarily a vb.net developer but I can read the c# if you write in that.
In case the above was too vague:
I understand what system.transactions does and how to use it. What I want to know is how to create something similar, my own library that I can wrap around some code that can handle it in the same manner as the system.transactions scope does. I plan on using this with a caching model and it would greatly enhance it. I'm looking for details on how transaction scope knows for example that there is a parent scope and so it can attach to it and such, or that a commit then needs to take place at a higher level or in a higher contact.
For example, if I have the following
using scope1 as new system.transactions.scope
using scope2 as new system.transactions.scope
using scope3 as new system.transactions.scope
scope3.commit
end using
scope2.commit
end using
end using
Scope1 will not commit and so neither will scope2 or scope3 since the parent to them all is the context of scope1. I'd like to be able to set this up with my own libraries.