Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread Naming for easier Thread Dump analysis - CUSTCOM-145 #4405

Merged
merged 2 commits into from
Jan 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public class ResourceAdapterAdminServiceImpl extends ConnectorService {
public Thread newThread(Runnable r) {
Thread th = new Thread(r);
th.setDaemon(true);
th.setName("RA Shutdown");
return th;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ public synchronized ObjectName start() {

mLoaderThread = new AMXConfigLoaderThread(mPendingConfigBeans);
mLoaderThread.setDaemon(true);
mLoaderThread.setName("AMX Config Loader");
mLoaderThread.start();

mPendingConfigBeans.swapTransactionListener(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ public QueueItem(final Notification notif, final NotificationEmitterSupport send
public SenderThread()
{
setDaemon(true);
setName("JMX Notification Emitter");
mQuit = false;
mPendingNotifications = new LinkedBlockingQueue<QueueItem>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void run() {
}
}
};
pump.setName("logging output pump");
pump.setName("Logging output pump");
dmatej marked this conversation as resolved.
Show resolved Hide resolved
pump.setDaemon(true);
pump.start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void run() {
}
};
thread.setDaemon(true);
thread.setName("OSGI Framework Init");
thread.start();
thread.join();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public class JobCleanUpService implements PostConstruct,ConfigListener {

@Inject
Domain domain;

@Inject
private ProcessEnvironment processEnv;

private ManagedJobConfig managedJobConfig;

private final static Logger logger = KernelLoggerInfo.getLogger();
Expand All @@ -98,23 +98,22 @@ public class JobCleanUpService implements PostConstruct,ConfigListener {

@Override
public void postConstruct() {
logger.log(Level.FINE,KernelLoggerInfo.initializingJobCleanup);

if (Version.getFullVersion().contains("Micro")) {
dmatej marked this conversation as resolved.
Show resolved Hide resolved
//if Micro we don't have any jobs to cleanup
return;
}

logger.log(Level.FINE,KernelLoggerInfo.initializingJobCleanup);

scheduler = Executors.newScheduledThreadPool(10, new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread result = new Thread(r);
result.setDaemon(true);
result.setName("Job Cleanup Service");
return result;
}
});

if (Version.getFullVersion().contains("Micro")) {
//if Micro we don't have any jobs to cleanup
return;
}

managedJobConfig = domain.getExtensionByType(ManagedJobConfig.class);
ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(managedJobConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ protected DomDocument getDomDocument() {
public Thread newThread(Runnable r) {
Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true);
t.setName("GF Domain XML");
t.setContextClassLoader(habitat.<ServerContext>getService(ServerContext.class).getCommonClassLoader());
return t;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public ScheduledExecutorService provide() {
public Thread newThread(Runnable r) {
Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true);
t.setName("Scheduled Executor Service");
return t;
}
}
Expand Down