2009年5月6日水曜日

Stop Jetty Server using "Java VisualVM" and "TASKKILL"

For us "NetBeans Lover", Application Server is GlassFish,some Applications need to use Jetty.
Recently popular Google Application Engine and Grails are the samples to need Jetty,and Red5 also uses Jetty.
When we use NetBeans as Application server and try to develop Grails,Google Application Engine application,we encounter the difficulty related to Jetty.
The difficulty is that we can not control(Start,Stop,watch contents) Jetty on NetBeans contrasting to GlassFish and Tomcat.
Once we try application,Jetty continues to run active and when we try to next variation of application,we encounter next message:
"2009/05/06 18:55:47 com.google.apphosting.utils.jetty.JettyLogger warn
Warning: failed SelectChannelConnector@localhost:8080"

At such case,we can resolve this trouble by rebooting PC,then we may lose much Time and efficiency of Development would be worth.

At such time useful method is ' Stop Jetty Server using "Java VisualVM" and "TASKKILL" '.
Suddenly the idea of using "Java VisualVM" hitted on,I could obtain the PID(Process ID number).

Like this we can check PIDs of GAE sample application using "Java VisualVM".

When we start Sample application on DOS command line,we can stop batch job using Ctrl-C,
but the Jetty process sometimes remains active.

Then I searched command to stop Windows process using PID,and found out "TASKKILL".
USAGE:
  Stop Process ID 1230
  taskkill /pid 1230
This command is available only on Windows Professional Edition,
but I could copy this command from Profession Edition to Home Edition
and I could use this command on Windows Home Edition.

2 コメント:

NetBeans Profiler さんのコメント...

You can stop Jetty Server directly from VisualVM. Use 'Kill Application' VisualVM plugin, which is available on VisualVM Plugin Center.

stera さんのコメント...

Thank you for this important infomation.

--stera