Is there away to set the standard jdk corba ORB's thread names used in the default thread pool?
By default there are 3 threads per connections. Their name is useless as they always default to: p:default-threadpool; w: Idle
. It would be great to change their names mainly for debugging reasons.
Looking at the JDK com.sun.corba.se.impl.orbutil.threadpool.ThreadpoolManagerImpl
source I can see that the name cannot be accessed from outside the class. At the moment I use the Thread.currentThread().setName()
to set the thread name once I control the thread but it seems a hack. Is there a better way?
You could iterate over the threads that are currently running and rename them as required. Something like: