Package edu.emory.mathcs.backport.java.util.concurrent

Examples of edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch.await()


    public void doExecute(WorkerContext work, Executor executor)
            throws WorkException, InterruptedException {
        CountDownLatch latch = work.provideEndLatch();
        executor.execute(new NamedRunnable("A J2EE Connector", work));
        latch.await();
    }

}
View Full Code Here


    public void doExecute(WorkerContext work, Executor executor)
            throws WorkException, InterruptedException {
        CountDownLatch latch = work.provideStartLatch();
        executor.execute(new NamedRunnable("A J2EE Connector", work));
        latch.await();
    }
}
View Full Code Here

        CountDownLatch stopLatch = new CountDownLatch(1);
        EJBClientWorker worker = new EJBClientWorker(msgContext, startLatch, stopLatch);
        workerPool.execute(worker);
        startLatch.countDown();
        try {
            stopLatch.await();
        } catch (InterruptedException e) {
            throw AxisFault.makeFault(e);
        }

        if (worker.getException() != null) {
View Full Code Here

        c1.set( future.getSession() );
        ((IoSession) c1.get()).write( "start" );

        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();

        while ( !messageCount.await( 100, TimeUnit.MILLISECONDS ) ) {
            long[] threads = threadMXBean.findMonitorDeadlockedThreads();

            if ( null != threads ) {
                StringBuffer sb = new StringBuffer( 256 );
                ThreadInfo[] infos = threadMXBean.getThreadInfo( threads, Integer.MAX_VALUE );
View Full Code Here

        in.setBody("Hello");
        in.setHeader("cheese", 123);
        producer.process(exchange);
       
        // The Activated endpoint should send it to the pojo due to the configured route.
        assertTrue("The message ware received by the Pojo", receivedCountDown.await(5, TimeUnit.SECONDS));
       

  }

    @Override
View Full Code Here

        } finally {
            // tell thread to start cleanup (e.g., end and rollback the tx)
            cleanupSignal.countDown();

            // wait for our thread to finish cleanup
            endSignal.await();
        }
    }

    public void testOnlyOneImportedTxAtATime() throws Exception {
        Xid xid1 = xidFactory.createXid();
View Full Code Here

    public void doExecute(WorkerContext work, Executor executor)
            throws WorkException, InterruptedException {
        CountDownLatch latch = work.provideEndLatch();
        executor.execute(new NamedRunnable("A J2EE Connector", work));
        latch.await();
    }

}
View Full Code Here

    public void doExecute(WorkerContext work, Executor executor)
            throws WorkException, InterruptedException {
        CountDownLatch latch = work.provideStartLatch();
        executor.execute(new NamedRunnable("A J2EE Connector", work));
        latch.await();
    }
}
View Full Code Here

                    latch.countDown();
                }
            }.start();

            latch.await();

            System.out.println(receiver);

            Thread.sleep(60000);
View Full Code Here

        _receiverThread.start();

        _sender.run();

        assertTrue(disconnectedLatch.await(20000, TimeUnit.MILLISECONDS));

        assertTrue(!_receiver.isConnected());

        _sender.shutdown();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.