1 17 18 package org.apache.geronimo.connector.work.pool; 19 20 import javax.resource.spi.work.WorkException ; 21 22 import org.apache.geronimo.connector.work.WorkerContext; 23 24 import edu.emory.mathcs.backport.java.util.concurrent.Executor; 25 import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch; 26 27 33 public class SyncWorkExecutor implements WorkExecutor { 34 35 public void doExecute(WorkerContext work, Executor executor) 36 throws WorkException , InterruptedException { 37 CountDownLatch latch = work.provideEndLatch(); 38 executor.execute(new NamedRunnable("A J2EE Connector", work)); 39 latch.await(); 40 } 41 42 } 43 | Popular Tags |