This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using apache tomcat (6.0.14) with java (1.5.0_15) on linux ( vmrhel 2.6.9-34.EL) running inside a virtual machine
When I start tomcat it should start only 1 java process. But in my case it starts 8-10 processes. If I shutdown tomcat all processes vanishes. All the processes seems to be replica of the parent process. If I kill any of the process tomcat shuts down.
One more observation is, on i have 2 users on my system, root and oracle. This problem comes when I start tomcat as oracle but if I am root, tomcat behaves as usual i.e no extra java processes only one.
I tried using tomcat 5 but problem persists with same observations.
What could be the reason for such behavior?
please find the screenshot for better understanding...
Tom Reilly wrote:I believe they are not multiple processes - they are multiple threads of a single process.
That was my opinion, too, but normally RHEL tomcat's threads aren't OS threads, so they don't appear on the "ps" command. Of course, there's a possibility of something like some funny JNI code spawning threads using the OS thread manager.
The "px axf" command should display process hierarchy. As long as they're all children of a common catalina process, it's probably OK.
An IDE is no substitute for an Intelligent Developer.