Examples of RunnableWrapper


Examples of org.apache.geronimo.concurrent.test.RunnableWrapper

        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        BasicTaskRunnable runnable = new BasicTaskRunnable(classLoader);
        runnable.setTestEjbSecurity(testEjbSecurity);
       
        Runnable task = (Runnable)contextService.createContextObject(runnable, new Class [] {Runnable.class});
        RunnableWrapper wrapper = new RunnableWrapper(task);       
        Thread t = new Thread(wrapper);       
        t.start();
        t.join();
       
        Throwable throwable = wrapper.getThrowable();
        if (throwable instanceof Exception) {
            throw (Exception)throwable;
        } else if (throwable instanceof Error) {
            throw (Error)throwable;
        }
View Full Code Here

Examples of org.apache.geronimo.concurrent.test.RunnableWrapper

        ManagedThreadFactory threadFactory = getThreadFactory();

        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        BasicTaskRunnable runnable = new BasicTaskRunnable(classLoader);
        runnable.setTestEjbSecurity(testEjbSecurity);
        RunnableWrapper wrapper = new RunnableWrapper(runnable);
        Thread t = threadFactory.newThread(wrapper);
        t.start();
        t.join();
       
        Throwable throwable = wrapper.getThrowable();
        if (throwable instanceof Exception) {
            throw (Exception)throwable;
        } else if (throwable instanceof Error) {
            throw (Error)throwable;
        }
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.