1 17 18 package org.apache.geronimo.timer.vm; 19 20 import javax.transaction.TransactionManager ; 21 22 import edu.emory.mathcs.backport.java.util.concurrent.Executor; 23 24 import org.apache.geronimo.gbean.GBeanInfo; 25 import org.apache.geronimo.gbean.GBeanInfoBuilder; 26 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; 27 import org.apache.geronimo.timer.NontransactionalExecutorTaskFactory; 28 import org.apache.geronimo.timer.PersistentTimer; 29 import org.apache.geronimo.timer.ThreadPooledTimer; 30 31 37 public class VMStoreThreadPooledNonTransactionalTimer extends ThreadPooledTimer { 38 39 public VMStoreThreadPooledNonTransactionalTimer(TransactionManager transactionManager, Executor threadPool) { 40 super(new NontransactionalExecutorTaskFactory(), 41 new VMWorkerPersistence(), threadPool, transactionManager); 42 } 43 44 45 public static final GBeanInfo GBEAN_INFO; 46 47 static { 48 GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(VMStoreThreadPooledNonTransactionalTimer.class); 49 infoFactory.addInterface(PersistentTimer.class); 50 51 infoFactory.addReference("ThreadPool", Executor.class, NameFactory.GERONIMO_SERVICE); 52 infoFactory.addReference("TransactionManager", TransactionManager .class, NameFactory.TRANSACTION_MANAGER); 53 54 infoFactory.setConstructor(new String [] {"TransactionManager", "ThreadPool"}); 55 GBEAN_INFO = infoFactory.getBeanInfo(); 56 } 57 58 public static GBeanInfo getGBeanInfo() { 59 return GBEAN_INFO; 60 } 61 } 62 | Popular Tags |