dectxn - Rails Declarative Transactions Plugin

RubyForge - dectxn project page

Blog - dectxn blog

API - dectxn rdoc

Installation

To install the CURRENT dectxn plugin.
ruby script/plugin install http://dectxn.rubyforge.org/svn/tags/CURRENT/plugins/dectxn

To install the CURRENT dectxn plugin with -x (svn:externals).
ruby script/plugin install -x http://dectxn.rubyforge.org/svn/tags/CURRENT/plugins/dectxn

To install a specific version.
ruby script/plugin install http://dectxn.rubyforge.org/svn/tags/v0.1.2/plugins/dectxn

To install the trunk version.
ruby script/plugin install -x http://dectxn.rubyforge.org/svn/trunk/plugins/dectxn

Dependencies

dectxn uses the aquarium AOP framework for wrapping transactions around methods.

To install the aquarium gem.
sudo gem install aquarium

Usage and Examples

Installing the dectxn plugin (see above) will create config/initializers/dectxn_config.rb.
Entries in this file can be used to declaratively apply transactional support to method calls.

For example the following entry will apply required transactional semantics to calls to all methods beginning "my_" in instances of the Account class.

Txn::required :for_types => Account, :calls_to => /^my_/

License

The dectxn plugin is licensed under the MIT license.