Skip to content

Instantly share code, notes, and snippets.

@jbuda
Created March 19, 2013 12:37
Show Gist options
  • Save jbuda/5195742 to your computer and use it in GitHub Desktop.
Save jbuda/5195742 to your computer and use it in GitHub Desktop.
Output of a CFThread with Java
<cfset thr = CreateObject('java', 'java.lang.management.ManagementFactory').getThreadMXBean() >
<cfset in = CreateObject('java', 'java.lang.Integer')>
<cfset thrArray = thr.getThreadInfo(thr.getAllThreadIds(),in.MAX_VALUE)>
<cfloop array="#thrArray#" index="thread">
<cfset st = thread.getStackTrace()>
<cfloop array="#st#" index="stack">
<cfdump var="#thread.getThreadId()# #stack.getClassName()# - #stack.getMethodName()# - #stack.getFileName()#" /><br/>
</cfloop>
</cfloop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment