The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:Struts actions are not processes. They run under process threads, which are obtained from the Tomcat request thread pool and are returned to that pool once the action is complete.
My first line of defense against runaway code is the debugger, which allows me to see what threads are running and to pause them. If I pause a runaway thread, the CPU usage would normally improve greatly, then return to 100% when the thread is resumed.
Jayesh A Lalwani wrote:Taking a thread dump of the tomcat process will give you the stack trace of the current execution point of each thread. You can then search through the thread dump for your action class names. This will tell you which thread is executing your action class. Then you can attach a debugger and halt the thread that is executing your class to debug it.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:Add Eclipse to your list and use its debugger.
There are other debuggers that would do the job as well (since Java uses a standard debug interface), but it's free and lots of people here know how to use it.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.