Recently in Jetty Category

Jetty 6 is my favorite servlet container.  It's super fast, easy to embed, and very easy to use.  I have run into one issue pretty often, though.

The built in jetty.sh script often hangs when given the stop command.  This isn't a big deal when I'm doing development, but it's a problem when I'm trying to bounce Jetty in a test environment from continuous integration software like Hudson.

To solve this problem I came up with a very crude shell script to kill all jetty processes (including hung jetty.sh stop processes).  It also manually exits 0 to feign success even if no Jetty is found.  This keeps Hudson happy.

killjetty.sh:

#!/usr/xpg4/bin/sh
ps -ef | grep jetty | grep -v killjetty | grep -v grep | awk '{ print $2 }' | xargs kill -9 
exit 0
0 Votes

About this Archive

This page is an archive of recent entries in the Jetty category.

Java is the previous category.

Joyent is the next category.

Find recent content on the main index or look in the archives to find all content.

Jetty: Monthly Archives