ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(10));
CountDownLatch startSignal = new CountDownLatch(1);
CountDownLatch doneSignal = new CountDownLatch(5);
executor.execute(new BookWorker("http://localhost:" + PORT + "/bookstore/" + pathSegment + "/1",
"1",
"CXF in Action1", startSignal, doneSignal));
executor.execute(new BookWorker("http://localhost:" + PORT + "/bookstore/" + pathSegment + "/2",
"2",
"CXF in Action2", startSignal, doneSignal));