3

Possible Duplicate:
Can I get the name of the class and method within which the current thread was spawned?

Are there any tools (perhaps a javaagent) that will let me identify what started a thread after the event?

I have a Tomcat that won't shut down, and the thread names (from the dump) aren't of much use.

2
  • Definite duplicate :) voted to close. Commented Sep 16, 2011 at 12:48
  • I was going to say it is not duplicate because OP wants to know this after the fact. Then I realized the OP wants to close it:) Commented Sep 16, 2011 at 12:51

2 Answers 2

0

The lowest level call of a stack trace might indicate how/why a thread was started...

Sign up to request clarification or add additional context in comments.

Comments

0

Do one thing, print the stack trace, and you will get who started the thread.

3 Comments

You don't have to print it. It's available from a getter: Thread.currentThread().getStackTrace() since 1.5
Does tomcat do something special here? Otherwise, the stacktrace stops at Thread.run
I already have the stack trace (hence my comment saying I had the dump) but that doesn't give any useful information.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.