Made the PersistCommit method virtual, so we can hook custom code in it