using a transaction to commit data to the database. Put setAutoCommit as
false. TODO - move this to the listener