Update of /var/cvs/src/org/mmbase/util In directory james.mmbase.org:/tmp/cvs-serv19010
Modified Files: ThreadPools.java Log Message: Casting still not working completely on rmmci See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util Index: ThreadPools.java =================================================================== RCS file: /var/cvs/src/org/mmbase/util/ThreadPools.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- ThreadPools.java 30 Apr 2009 18:48:43 -0000 1.29 +++ ThreadPools.java 30 Apr 2009 20:24:23 -0000 1.30 @@ -18,7 +18,7 @@ * * @since MMBase 1.8 * @author Michiel Meeuwissen - * @version $Id: ThreadPools.java,v 1.29 2009/04/30 18:48:43 michiel Exp $ + * @version $Id: ThreadPools.java,v 1.30 2009/04/30 20:24:23 michiel Exp $ */ public abstract class ThreadPools { private static final Logger log = Logging.getLoggerInstance(ThreadPools.class); @@ -73,7 +73,7 @@ private static Thread newThread(Runnable r, final String id) { boolean isUp = org.mmbase.bridge.ContextProvider.getDefaultCloudContext().isUp(); Thread t = new Thread(threadGroup, r, - isUp ? org.mmbase.module.core.MMBaseContext.getMachineName() + ":" + id : id) { + isUp ? getMachineName() + ":" + id : id) { /** * Overrides run of Thread to catch and log all exceptions. Otherwise they go through to app-server. */ @@ -106,9 +106,7 @@ } }); - static { - jobsExecutor.execute(new Runnable() { - public void run() { + private static String getMachineName() { String machineName; try { org.mmbase.bridge.ContextProvider.getDefaultCloudContext().assertUp(); @@ -118,6 +116,13 @@ // rmmci-client jar. machineName = "localhost"; } + return machineName; + } + + static { + jobsExecutor.execute(new Runnable() { + public void run() { + String machineName = getMachineName(); for (Thread t : nameLess) { t.setName(machineName + ":" + t.getName()); } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs