Just a quick (and perhaps obvious) note for MySQL users;
Don't scratch your head if it isn't working if you are using a MyISAM table to test the rollbacks with.
Both rollBack() and beginTransaction() will return TRUE but the rollBack will not happen.
Convert the table to InnoDB and run the test again.