Reach PDO object without getPDO().

Change-Id: I64ccaacbda2aa4bd1a218723246026b5afe4af31
Only rollback if in transaction.

Change-Id: Id0dd3b8055cfe6ddc5d8575be47efcc6598357a6