Skip to content
haf edited this page Nov 14, 2011 · 17 revisions

Welcome to the Castle Transactions wiki pages!

The Castle Transaction project, Castle AutoTx Facility and Castle NHibernate Facility allow you easy-to-use and granular control over your code. All code in this repository is proven using Microsoft Code Contracts and has been analysed with static analysis to prove the correctness. (The reason for this: I am sick and tired of buggy software and I want to be the source of non-buggy software.)

Below follows a list of wiki pages explaining the different concepts available.

Castle Transaction Services

The transaction implementations tie into the LTM/Lightweight Transaction Manager in .Net which automatically handles promotions to DTC, should that be required. The functionality is based around Windsor, an IoC/Inversion of Control container and is realized using AOP/Aspect Oriented Programming in the form of an interceptor.

Prominent features include a transaction manager, file and directory transactions, path utilities and a few interfaces + code contracts.

Creds:

  • Initial Code
    • Hammett/Hamilton Verissimo
  • TxF/File/Directory/Path-improvements (2.0)
    • Me/Henrik Feldt
  • Core-2.5-upgrade:
  • Transactions Project rewritten from scratch (3.0)
    • Me/Henrik Feldt

Castle AutoTx Facility

This facility is where you get back value for the time it takes you to read this wiki. This is the glue that holds the bits and pieces from Castle Transactions together and the stuff that will make your co-workers googly-eyed and impressed.

Prominent features include the ability to do asynchronous transaction commits [Transaction(AsyncCommit = true)], fork transactions onto the thread pool [Transaction(Fork = true)] or even suppress transactions [Transaction(TransactionMode.Suppress)] if the method is running in an ambient transaction and you want to perform a side-effect that should not be transactional (for some reason). The main idea is that transactions should be easy to apply and should be applied to Command Handlers or Services -- and components resolved from within transactions should be as long-living as their ambient transactions.

Creds:

  • Original facility
    • Hammett/Hamilton Verissimo (excellent facility from the start!)
  • TxF/File/Directory/Path-improvements (2.0)
    • Myself/Henrik Feldt
  • Dependencies-recompile/Core-2.5-upgrade
    • Henry Conceicao (thanks for the help!)
  • AutoTx rewritten from scratch (3.0)
    • Myself/Henrik Feldt

Castle NHibernate Facility

Castle Transaction Services are tried and tested in NHibernate Facility, and the transaction services tie into many other transactional resource managers.

Getting in Touch

If you have any questions, please send me an e-mail: henrik@haf.se or ask at Castle Project Users - Google Groups. As long as the projects are at RC-status I prefer if you e-mail me; it'll be a faster turn-around time and I get the e-mails straight to my inbox.