code: public void runInTransaction(Runnable runnable)
      throws DataAccessException {
          TransactionWrapper transaction=null;
          try {
              transaction = startTransaction();
              runnable.run();
          } finally {
              stopTransaction(transaction);
          }
      }
docs: For running your own code inside a transaction.
  To be used in execute() method when transactions are not turned on globally.
  @param runnable
  @throws ProcessException
  @throws DataAccessException