1 17 18 package org.apache.geronimo.timer; 19 20 import javax.transaction.TransactionManager ; 21 22 28 public class TransactionalExecutorTaskFactory implements ExecutorTaskFactory { 29 30 private final TransactionManager transactionManager; 31 private int repeatCount; 32 33 public TransactionalExecutorTaskFactory(TransactionManager transactionManager, int repeatCount) { 34 this.transactionManager = transactionManager; 35 this.repeatCount = repeatCount; 36 } 37 38 public int getRepeatCount() { 39 return repeatCount; 40 } 41 42 public ExecutorTask createExecutorTask(Runnable userTask, WorkInfo workInfo, ThreadPooledTimer threadPooledTimer) { 43 return new TransactionalExecutorTask(userTask, workInfo, threadPooledTimer, transactionManager, repeatCount); 44 } 45 46 } 47 | Popular Tags |