Re: restart the JVM?
Re: restart the JVM?
- Subject: Re: restart the JVM?
- From: Art Isbell <email@hidden>
- Date: Fri, 4 Jun 2004 12:40:24 -1000
On Jun 4, 2004, at 10:57 AM, Nathan Dumar wrote:
There have been a few times in the past that I could not track down a
bug ... and then the bug would disappear after restarting my computer.
I'm assuming (bad, I know) that restarting the JVM would accomplish
the same thing, and be much faster. Is this assumption right? Is
this possible to do without causing problems elsewhere? (Restarting
the Finder, for example, is harmless.) Does anyone know how to do it
in X.3?
Someone please correct me if I'm wrong, but I don't believe there is a
single JVM that is started at boot time just waiting to host Java
processes. I believe a JVM process is started as each Java process is
launched although I do recall Apple working with Sun to develop a JVM
that runs multiple Java processes (not sure if that's the JVM available
in OS X).
If you look at a list of OS X processes, you'll see 0 or more "java"
processes. I believe these are each JVM instances.
When you stop a WO process either from Xcode or JavaMonitor, its JVM
process is stopped. You can kill a "java" process using the Unix
"kill" utility or Activity Monitor, but knowing what Java process
you're killing is not always easy. The "ps" utility can shed some
light on this:
$ ps -auxww | grep java | grep -v grep
root 343 0.0 0.1 18644 620 ?? S 7:52AM 0:00.02 sh
/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/
Resources/javawoservice.sh -appPath
/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd
root 356 0.0 3.7 285840 28896 ?? S 7:52AM 0:30.68
java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory=/System
-DWOLocalRootDirectory= -DWOUserDirectory=/ -DWOEnvClassPath=
-DWOApplicationClass=Application -DWOPlatform=MacOS
-Dcom.webobjects.pid=356 -DWOAllowRapidTurnaround=false -classpath
WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap
This shows one JVM instance, pid 356, that was started when I booted my
computer this morning. I can tell that it's a WO app because of the
names of java's arguments. But there is nothing in the process 356
entry that indicates that this is wotaskd. I assume that it is running
wotaskd because process 343, a Bourne shell, started the wotaskd
process.
So if this is true, there is no single JVM process that you could
restart either itself or by rebooting that might solve these mysterious
bugs. I almost never reboot OS X to resolve weird behavior although
this seems to be a common practice for Windows users. Occasionally, an
application can become "confused" requiring it to be restarted, but
this doesn't require a reboot. Rarely have processes started during
the boot required restarting to solve a problem I've had.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.