private Thread createThread(final Runnable target) { final ThreadNameInfo nameInfo = new ThreadNameInfo(globalThreadIndexSequence.getAndIncrement(), factoryThreadIndexSequence.getAndIncrement(), factoryIndex); final JBossThread thread; if (stackSize != null) { thread = new JBossThread(threadGroup, target, "<new>", stackSize.longValue()); } else { thread = new JBossThread(threadGroup, target); } thread.setThreadNameInfo(nameInfo); thread.setName(nameInfo.format(thread, namePattern)); if (initialPriority != null) thread.setPriority(initialPriority.intValue()); if (daemon != null) thread.setDaemon(daemon.booleanValue()); if (uncaughtExceptionHandler != null) thread.setUncaughtExceptionHandler(uncaughtExceptionHandler); JBossExecutors.clearContextClassLoader(thread); return thread; } }
private static void appendGroupPath(ThreadGroup group, StringBuilder builder) { final ThreadGroup parent = group.getParent(); if (parent != null) { appendGroupPath(parent, builder); builder.append(':'); } builder.append(group.getName()); } }
public void execute(final Runnable command) { final JBossThread thr = JBossThread.currentThread(); final String oldName = thr.getName(); thr.setName(thr.getThreadNameInfo().format(thr, nameFormat)); try { delegate.execute(command); } finally { thr.setName(oldName); } }
public void execute(final Runnable command) { final JBossThread thr = JBossThread.currentThread(); final String oldName = thr.getName(); thr.setName(thr.getThreadNameInfo().format(thr, nameFormat)); try { delegate.execute(command); } finally { thr.setName(oldName); } }
private Thread createThread(final Runnable target) { final ThreadNameInfo nameInfo = new ThreadNameInfo(globalThreadIndexSequence.getAndIncrement(), factoryThreadIndexSequence.getAndIncrement(), factoryIndex); final JBossThread thread; if (stackSize != null) { thread = new JBossThread(threadGroup, target, "<new>", stackSize.longValue()); } else { thread = new JBossThread(threadGroup, target); } thread.setThreadNameInfo(nameInfo); thread.setName(nameInfo.format(thread, namePattern)); if (initialPriority != null) thread.setPriority(initialPriority.intValue()); if (daemon != null) thread.setDaemon(daemon.booleanValue()); if (uncaughtExceptionHandler != null) thread.setUncaughtExceptionHandler(uncaughtExceptionHandler); JBossExecutors.clearContextClassLoader(thread); return thread; } }
case 'g': builder.append(globalThreadSequenceNum); break; case 'f': builder.append(factorySequenceNum); break; case 'p': if (group != null) appendGroupPath(group, builder); break; case 'i': builder.append(thread.getId()); break; case 'G': if (group != null) builder.append(group.getName()); break;
public void execute(final Runnable command) { final JBossThread thr = JBossThread.currentThread(); final String oldName = thr.getName(); thr.setName(thr.getThreadNameInfo().format(thr, nameFormat)); try { delegate.execute(command); } finally { thr.setName(oldName); } }
private Thread createThread(final Runnable target) { final ThreadNameInfo nameInfo = new ThreadNameInfo(globalThreadIndexSequence.getAndIncrement(), factoryThreadIndexSequence.getAndIncrement(), factoryIndex); final JBossThread thread; if (stackSize != null) { thread = new JBossThread(threadGroup, target, "<new>", stackSize.longValue()); } else { thread = new JBossThread(threadGroup, target); } thread.setThreadNameInfo(nameInfo); thread.setName(nameInfo.format(thread, namePattern)); if (initialPriority != null) thread.setPriority(initialPriority.intValue()); if (daemon != null) thread.setDaemon(daemon.booleanValue()); if (uncaughtExceptionHandler != null) thread.setUncaughtExceptionHandler(uncaughtExceptionHandler); JBossExecutors.clearContextClassLoader(thread); return thread; } }
private static void appendGroupPath(ThreadGroup group, StringBuilder builder) { final ThreadGroup parent = group.getParent(); if (parent != null) { appendGroupPath(parent, builder); builder.append(':'); } builder.append(group.getName()); } }
private static void appendGroupPath(ThreadGroup group, StringBuilder builder) { final ThreadGroup parent = group.getParent(); if (parent != null) { appendGroupPath(parent, builder); builder.append(':'); } builder.append(group.getName()); } }
case 'g': builder.append(globalThreadSequenceNum); break; case 'f': builder.append(factorySequenceNum); break; case 'p': if (group != null) appendGroupPath(group, builder); break; case 'i': builder.append(thread.getId()); break; case 'G': if (group != null) builder.append(group.getName()); break;
case 'g': builder.append(globalThreadSequenceNum); break; case 'f': builder.append(factorySequenceNum); break; case 'p': if (group != null) appendGroupPath(group, builder); break; case 'i': builder.append(thread.getId()); case 'G': if (group != null) builder.append(group.getName()); break;