开发者

How can I stop the spawned process in jetty 7 using jetty.sh?

I am using Jetty 7.4 for one of my projects. I need to configure it so that it can start/stop automatically whenever the server starts up or goes down. Also, I should be able to start/stop the server on demand. I am using the start/stop script that comes along with jetty(bin/jetty.sh). The server starts just fine. However, when it comes to stopping the server, I am facing some problems.

Jetty expects you to start the server with "--exec" command line parameter and this parameter spawns another JVM instance. Now there are two processes running for jetty. When you try to stop the jetty server using the script the first process dies successfully. However, I can still see the spawned process.

I've searched the web and people have asked this question at multiple places but I could not find a so开发者_高级运维lution to this problem. Any ideas?

thanks,

NG


This doesn't really answer the question, but I worked around this by specifying JVM options in a new file in /etc/default/jetty. There you can set JVM options using something like this:

JAVA_OPTIONS="-XX:MaxPermSize=128m -Xms1024m -Xmx1024m"

Then you won't have to spawn another process using --exec and you can just use jetty.sh to start and stop the one process normally.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜