Package org.apache.openejb.resource.thread

Examples of org.apache.openejb.resource.thread.ManagedScheduledExecutorServiceImplFactory.create()


    @Test
    public void createServiceTest() {
        final ManagedScheduledExecutorServiceImplFactory factory = new ManagedScheduledExecutorServiceImplFactory();
        factory.setThreadFactory(MyThreadFactory.class.getName());
        final ManagedScheduledExecutorServiceImpl executorService = factory.create();
        final ScheduledThreadPoolExecutor poolExecutor = (ScheduledThreadPoolExecutor) executorService.getDelegate();
        Assert.assertEquals(poolExecutor.getThreadFactory().getClass(), ManagedThreadFactoryImpl.class);
    }

    public static class MyThreadFactory {
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.