This facility manages the creation of Transactions and the associated commit or rollback, depending on whether the method throws an exception or not.
Transactions are logical. It is up the other integration to be transaction aware and enlist its resources on it.
This facility usually works together with others facilities, as it requires an implementation of
. Currently the ActiveRecord Integration Facility
and NHibernate facility
Defining transaction behavior on components
You can use attributes or the configuration file to associate transaction information with your components.
public class BusinessClass
public void Load(int id)
// note the "virtual"
public virtual void Save(Data data)
<method name="Save" />
<method name="Create" />
Class methods must be virtual
If you are registering the component without an interface as a service you must make the methods virtual in order to being intercepted. Please refer to DynamicProxy documentation
for more information about it.
NotSupported: Transaction context will be created but no transaction is started
Requires: Transaction context will be created if not present
RequiresNew: A new transaction context will be created (not supported at the moment)
Supported: An existing appropriate transaction context will be joined if present (not supported at the moment)