testContextMigration(true);
}
private void testContextMigration(boolean testEjbSecurity) throws Exception {
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();