Calls the {@link TransactionWorker#doWork} method and, for transactionalenvironments, begins and ends a transaction. If the environment given is non-transactional, a transaction will not be used but the doWork() method will still be called.
In a transactional environment, a new transaction is started before calling doWork(). This will start a nested transaction if one is already active. If DbDeadlockException is thrown by doWork(), the transaction will be aborted and the process will be repeated up to the maximum number of retries specified. If another exception is thrown by doWork() or the maximum number of retries has occurred, the transaction will be aborted and the exception will be rethrown by this method. If no exception is thrown by doWork(), the transaction will be committed. This method will not attempt to commit or abort a transaction if it has already been committed or aborted by doWork().
@throws DbDeadlockException when it is thrown by doWork() and themaximum number of retries has occurred. The transaction will have been aborted by this method.
@throws Exception when any other exception is thrown by doWork(). Theexception will first be unwrapped by calling {@link ExceptionUnwrapper#unwrap}. The transaction will have been aborted by this method.