Package org.jboss.weld.executor

Examples of org.jboss.weld.executor.TimingOutFixedThreadPoolExecutorServices


    @Test
    public void testServices() throws Exception {
        assertTrue(manager.getServices().get(Validator.class) instanceof ConcurrentValidator);
        assertTrue(manager.getServices().get(ContainerLifecycleEvents.class).isPreloaderEnabled());
        assertTrue(manager.getServices().get(ExecutorServices.class) instanceof TimingOutFixedThreadPoolExecutorServices);
        TimingOutFixedThreadPoolExecutorServices executorServices = (TimingOutFixedThreadPoolExecutorServices) manager.getServices().get(ExecutorServices.class);
        // Use full capaticy of the pool
        assertEquals(3, executorServices.getPoolSize());
        Thread.sleep(7000l);
        // All workers timed out
        assertEquals(0, executorServices.getPoolSize());
    }
View Full Code Here

TOP

Related Classes of org.jboss.weld.executor.TimingOutFixedThreadPoolExecutorServices

Copyright © 2018 www.massapicom. 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.