O
Oliver Wong
message
Damn, you got me there.
Maybe have some sort of synchronized Singleton which takes a Throwable
as part of its instantiation? All entry points to the program would "try" to
initialize the Singleton by generating a Throwable (and thus a stack trace)
and pass it on to the Singleton, who would ignore all such initializations
except for the first one, thus guaranteeing that it has the trace that
corresponds to the original entry point?
Of course, by using a Singleton, this assumes no funny business with the
class loader...
- Oliver
Provided you're still in the same thread main is executing in, anyways.
Damn, you got me there.
Maybe have some sort of synchronized Singleton which takes a Throwable
as part of its instantiation? All entry points to the program would "try" to
initialize the Singleton by generating a Throwable (and thus a stack trace)
and pass it on to the Singleton, who would ignore all such initializations
except for the first one, thus guaranteeing that it has the trace that
corresponds to the original entry point?
Of course, by using a Singleton, this assumes no funny business with the
class loader...
- Oliver