long ids[] = bean.getAllThreadIds();
for(int i=0; i < ids.length; i++) {
ThreadInfo info = bean.getThreadInfo(ids[i], STACK_DEPTH);
String threadName = THREAD_NODE_NAME + "-" + ids[i];
StatsHolder childNode = threadSystemNode.addChild(threadName, MonitoredObjectType.JVM_THREAD_INFO);
childNode.setStats(new JVMThreadInfoStatsImpl(info));
childNode.setStatsClass(com.sun.enterprise.admin.monitor.stats.JVMThreadInfoStats.class);
childNode.setDottedName(DottedNameFactory.getJVMThreadInfoDottedName(threadName));
childNode.setObjectName(MonitoringObjectNames.getJVMThreadInfoObjectName(threadName));
childNode.registerMBean();
}