4 Castle has a transaction service which is a simplification of JTA. The idea is to create logical transactions boundaries, usually associated with a thread (or something else) that represent an activity.
\r
6 Once a transaction is started, transaction-aware resources can detect it and enlist resources and/or register synchronizations. For example, NHibernate facility and ActiveRecord Facility start database transactions and enlist them into the logical transaction on the thread, so it's up to Castle.Services.Transaction to control the end of the transaction and how it's gonna end (commit/abort)
\r
8 This model is also very extensible. It wont be too difficult to create a transaction-aware IO (file services), and a transaction-aware email component.
\r
11 .Net 2 TransactionScope
\r
12 =======================
\r
14 With .Net 2 Microsoft offers a more lightweight and scoped transaction support which is also logical, but with a very limited API, i.e. not at all extensible.
\r
16 The most logical path would be to make bridge the Castle API to use/rely on MS' implementation, but as the API is almost 100% internal/private this won't be possible.
\r
19 What need to be accomplished
\r
20 ============================
\r
22 Ideally we continue to create castle transactions and thus continue to provide the extensibility we offer today. But we internally create a MS' transaction.
\r
24 Transaction-aware resources need to be tested to check if they integrate well with MS' API. For a more concrete example, if a logical transaction is created in the middle of an ActiveRecord operation, will the transaction be activated for the connections in use? Will it support isolated transactions?
\r
26 This require lots of tests and right now there's no clear and proven way to achieve the proposed goal, that's why we invite and encourage people to experiment and contribute.
\r
33 hammett / 4:13 AM 26/08/2006