# Force a thread dump from
# at least one JVM


a = "JVM"
alive = AdminControl.queryNames("type="+a+",*").splitlines()
if len(alive ) > 0:
	print "\n\nThere are",len(alive),a+("(s)"),"instantiated at this time"
	for x in alive:
                print "This is a",a,"\n",x,"\n"
                try:
                    print ".....attempting to dumpThreads..." 
                    AdminControl.invoke( x,"dumpThreads" )
                except:
                    print "Trying to create a heap dump caused a problem"
else:
    print "Could not find any",a

AdminConfig.reset()
