I created a Kohana module that simplifies the use of transactions:
https://github.com/brazzy/kohana-transactional
However, this requires at least Kohana 3.1. But then you just add
public $_transactional = true;
for the controller, and all actions are automatically performed inside the transaction, which is rolled back when the action fails with an exception.
Michael borgwardt
source share