Only commit/rollback if transaction is active
Merge pull request #1 from caelum/transaction

Only commit/rollback if transaction is active