1 10 11 27 28 package org.mule.impl.work; 29 30 import edu.emory.mathcs.backport.java.util.concurrent.Executor; 31 32 import org.mule.util.concurrent.Latch; 33 34 import javax.resource.spi.work.WorkException ; 35 36 39 public class StartWorkExecutor implements WorkExecutor 40 { 41 42 public void doExecute(WorkerContext work, Executor executor) throws WorkException , InterruptedException  43 { 44 Latch latch = work.provideStartLatch(); 45 executor.execute(work); 46 latch.await(); 47 } 48 } 49 | Popular Tags |