Hi,

Its been a while but here are the patches for using multiple instances
of Tomcat.

The last one (7) you may or may not wish to use...

I apologies for having missed this for so long.

Enjoy!

-- 
Best Regards,

Brett Delle Grazie
From 1c0a2ef05bfbde930962befd99799d4f6a318231 Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Mon, 17 Jan 2011 22:09:44 +0000
Subject: [PATCH 1/7] Low: tomcat: Use here-documents to simplify start/stop operations

---
 heartbeat/tomcat |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index 689edc7..671ba82 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -146,14 +146,14 @@ start_tomcat()
 		"$CATALINA_HOME/bin/catalina.sh" start $TOMCAT_START_OPTS \
 			>> "$TOMCAT_CONSOLE" 2>&1 &
 	else
-		su - -s /bin/sh "$RESOURCE_TOMCAT_USER" \
-			-c "export JAVA_HOME=${OCF_RESKEY_java_home};\
-                            export JAVA_OPTS=-Dname=${TOMCAT_NAME};\
-                            export CATALINA_HOME=${OCF_RESKEY_catalina_home};\
-                            export CATALINA_PID=${OCF_RESKEY_catalina_pid};\
-                            export CATALINA_OPTS=\"${OCF_RESKEY_catalina_opts}\";\
-                            $CATALINA_HOME/bin/catalina.sh start ${OCF_RESKEY_tomcat_start_opts}" \
-			>> "$TOMCAT_CONSOLE" 2>&1 &
+		cat<<-END_TOMCAT_START | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
+			export JAVA_HOME=${OCF_RESKEY_java_home}
+			export JAVA_OPTS=-Dname=${TOMCAT_NAME}
+			export CATALINA_HOME=${OCF_RESKEY_catalina_home}
+			export CATALINA_PID=${OCF_RESKEY_catalina_pid}
+			export CATALINA_OPTS=\"${OCF_RESKEY_catalina_opts}\"
+			$CATALINA_HOME/bin/catalina.sh start ${OCF_RESKEY_tomcat_start_opts}
+END_TOMCAT_START
 	fi
 
 	while true; do
@@ -181,13 +181,13 @@ stop_tomcat()
 			>> "$TOMCAT_CONSOLE" 2>&1 &
 		eval $tomcat_stop_cmd >> "$TOMCAT_CONSOLE" 2>&1
 	else
-		su - -s /bin/sh "$RESOURCE_TOMCAT_USER" \
-			-c "export JAVA_HOME=${OCF_RESKEY_java_home};\
-                            export JAVA_OPTS=-Dname=${TOMCAT_NAME};\
-                            export CATALINA_HOME=${OCF_RESKEY_catalina_home};\
-                            export CATALINA_PID=${OCF_RESKEY_catalina_pid};\
-                            $CATALINA_HOME/bin/catalina.sh stop" \
-			>> "$TOMCAT_CONSOLE" 2>&1 &
+		cat<<-END_TOMCAT_STOP | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
+			export JAVA_HOME=${OCF_RESKEY_java_home}
+			export JAVA_OPTS=-Dname=${TOMCAT_NAME}
+			export CATALINA_HOME=${OCF_RESKEY_catalina_home}
+			export CATALINA_PID=${OCF_RESKEY_catalina_pid}
+			$CATALINA_HOME/bin/catalina.sh stop
+END_TOMCAT_STOP
 	fi
 
 	lapse_sec=0
-- 
1.7.1

From 8a7e6c8fd4c5f130e19eadf669550a67473f2fa5 Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Tue, 18 Jan 2011 10:42:16 +0000
Subject: [PATCH 2/7] Low: tomcat: Fix to ensure default OCF_RESKEY_xx values are observed

Use the internal name of the OCF_RESKEY_xx variables throughout
ensuring that any defaults set at the beginning are observed.
---
 heartbeat/tomcat |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index 671ba82..9fb948a 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -147,12 +147,12 @@ start_tomcat()
 			>> "$TOMCAT_CONSOLE" 2>&1 &
 	else
 		cat<<-END_TOMCAT_START | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
-			export JAVA_HOME=${OCF_RESKEY_java_home}
+			export JAVA_HOME=${JAVA_HOME}
 			export JAVA_OPTS=-Dname=${TOMCAT_NAME}
-			export CATALINA_HOME=${OCF_RESKEY_catalina_home}
-			export CATALINA_PID=${OCF_RESKEY_catalina_pid}
-			export CATALINA_OPTS=\"${OCF_RESKEY_catalina_opts}\"
-			$CATALINA_HOME/bin/catalina.sh start ${OCF_RESKEY_tomcat_start_opts}
+			export CATALINA_HOME=${CATALINA_HOME}
+			export CATALINA_PID=${CATALINA_PID}
+			export CATALINA_OPTS="${CATALINA_OPTS}"
+			$CATALINA_HOME/bin/catalina.sh start ${TOMCAT_START_OPTS}
 END_TOMCAT_START
 	fi
 
@@ -182,10 +182,10 @@ stop_tomcat()
 		eval $tomcat_stop_cmd >> "$TOMCAT_CONSOLE" 2>&1
 	else
 		cat<<-END_TOMCAT_STOP | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
-			export JAVA_HOME=${OCF_RESKEY_java_home}
+			export JAVA_HOME=${JAVA_HOME}
 			export JAVA_OPTS=-Dname=${TOMCAT_NAME}
-			export CATALINA_HOME=${OCF_RESKEY_catalina_home}
-			export CATALINA_PID=${OCF_RESKEY_catalina_pid}
+			export CATALINA_HOME=${CATALINA_HOME}
+			export CATALINA_PID=${CATALINA_PID}
 			$CATALINA_HOME/bin/catalina.sh stop
 END_TOMCAT_STOP
 	fi
-- 
1.7.1

From 26326c4e3f762efd09b54f9eab3ed79da4192b9c Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Tue, 18 Jan 2011 11:03:15 +0000
Subject: [PATCH 3/7] Low: tomcat: Ensure name of tomcat resource is only used on start operation and expose JAVA_OPTS variable for use

A specific string (the 'name') of the tomcat resource agent is added as a
define to the JVM. This is used with a grep against the process table in
the monitor operation to determine if the process is still running.
This patch ensures the string is only added to the process on the start
operation.  This patch also exposes the JAVA_OPTS variable for use in
resource definitions.
---
 heartbeat/tomcat |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index 9fb948a..89c20bd 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -29,6 +29,7 @@
 #   OCF_RESKEY_tomcat_user  - A user name to start a resource. Default is root
 #   OCF_RESKEY_statusurl - URL for state confirmation. Default is http://127.0.0.1:8080
 #   OCF_RESKEY_java_home - Home directory of Java. Default is none
+#   OCF_RESKEY_java_opts - Options to pass to Java JVM for start and stop. Default is none
 #   OCF_RESKEY_catalina_home - Home directory of Tomcat. Default is none
 #   OCF_RESKEY_catalina_pid  - A PID file name of Tomcat. Default is OCF_RESKEY_catalina_home/logs/catalina.pid
 #   OCF_RESKEY_tomcat_start_opts - Start options of Tomcat. Default is none.
@@ -148,7 +149,7 @@ start_tomcat()
 	else
 		cat<<-END_TOMCAT_START | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
 			export JAVA_HOME=${JAVA_HOME}
-			export JAVA_OPTS=-Dname=${TOMCAT_NAME}
+			export JAVA_OPTS="${JAVA_OPTS}"
 			export CATALINA_HOME=${CATALINA_HOME}
 			export CATALINA_PID=${CATALINA_PID}
 			export CATALINA_OPTS="${CATALINA_OPTS}"
@@ -183,7 +184,7 @@ stop_tomcat()
 	else
 		cat<<-END_TOMCAT_STOP | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
 			export JAVA_HOME=${JAVA_HOME}
-			export JAVA_OPTS=-Dname=${TOMCAT_NAME}
+			export JAVA_OPTS="${JAVA_OPTS}"
 			export CATALINA_HOME=${CATALINA_HOME}
 			export CATALINA_PID=${CATALINA_PID}
 			$CATALINA_HOME/bin/catalina.sh stop
@@ -319,6 +320,14 @@ Home directory of Java.
 <content type="string" default="" />
 </parameter>
 
+<parameter name="java_opts" unique="0">
+<longdesc lang="en">
+Java JVM options used on start and stop.
+</longdesc>
+<shortdesc>Java options parsed to JVM, used on start and stop.</shortdesc>
+<content type="string" default="" />
+</parameter>
+
 <parameter name="catalina_home" unique="1" required="1">
 <longdesc lang="en">
 Home directory of Tomcat.
@@ -400,15 +409,15 @@ RESOURCE_TOMCAT_USER="${OCF_RESKEY_tomcat_user-RUNASIS}"
 RESOURCE_STATUSURL="${OCF_RESKEY_statusurl-http://127.0.0.1:8080}";
 
 JAVA_HOME="${OCF_RESKEY_java_home}"
-JAVA_OPTS="-Dname=$TOMCAT_NAME"
-SEARCH_STR="\\""${JAVA_OPTS}"
+JAVA_OPTS="${OCF_RESKEY_java_opts}"
 CATALINA_HOME="${OCF_RESKEY_catalina_home}"
 CATALINA_PID="${OCF_RESKEY_catalina_pid-$CATALINA_HOME/logs/catalina.pid}"
 
 TOMCAT_START_OPTS="${OCF_RESKEY_tomcat_start_opts}"
-CATALINA_OPTS="${OCF_RESKEY_catalina_opts}"
+CATALINA_OPTS="-Dname=$TOMCAT_NAME ${OCF_RESKEY_catalina_opts}"
 CATALINA_ROTATE_LOG="${OCF_RESKEY_catalina_rotate_log-NO}"
 CATALINA_ROTATETIME="${OCF_RESKEY_catalina_rotatetime-86400}"
+SEARCH_STR="\\""${CATALINA_OPTS}"
 
 export JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_PID CATALINA_OPTS
 
-- 
1.7.1

From b01f09a8033d6a04130fc7e49d7f48844fa72b40 Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Tue, 18 Jan 2011 14:16:08 +0000
Subject: [PATCH 4/7] Low: tomcat: remove eval of empty variable - does nothing.

Looks like a left-over from a possible 'execute this on stop' hook.
The variable is not used anywhere else in the file, therefore removing it.
---
 heartbeat/tomcat |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index 89c20bd..723e6d8 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -180,7 +180,6 @@ stop_tomcat()
 	if [ "$RESOURCE_TOMCAT_USER" = RUNASIS ]; then
 		"$CATALINA_HOME/bin/catalina.sh" stop \
 			>> "$TOMCAT_CONSOLE" 2>&1 &
-		eval $tomcat_stop_cmd >> "$TOMCAT_CONSOLE" 2>&1
 	else
 		cat<<-END_TOMCAT_STOP | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
 			export JAVA_HOME=${JAVA_HOME}
-- 
1.7.1

From b140750fd2de4992e7d3959c68a4194f07594d6b Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Tue, 18 Jan 2011 14:24:06 +0000
Subject: [PATCH 5/7] Med: tomcat: Add CATALINA_BASE parameter, defaults to CATALINA_HOME, permits multiple tomcat instances

By exposing the CATALINA_BASE parameter it is possible to have multiple
instances of Tomcat using the same binaries but with each instance having its
own configuration, applications etc.

Existing behaviour is preserved as CATALINA_BASE defaults to CATALINA_HOME
which is the default.
---
 heartbeat/tomcat |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index 723e6d8..1248a97 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -31,6 +31,7 @@
 #   OCF_RESKEY_java_home - Home directory of Java. Default is none
 #   OCF_RESKEY_java_opts - Options to pass to Java JVM for start and stop. Default is none
 #   OCF_RESKEY_catalina_home - Home directory of Tomcat. Default is none
+#   OCF_RESKEY_catalina_base - Base directory of Tomcat. Default is OCF_RESKEY_catalina_home
 #   OCF_RESKEY_catalina_pid  - A PID file name of Tomcat. Default is OCF_RESKEY_catalina_home/logs/catalina.pid
 #   OCF_RESKEY_tomcat_start_opts - Start options of Tomcat. Default is none.
 #   OCF_RESKEY_catalina_opts - CATALINA_OPTS environment variable. Default is none.
@@ -151,6 +152,7 @@ start_tomcat()
 			export JAVA_HOME=${JAVA_HOME}
 			export JAVA_OPTS="${JAVA_OPTS}"
 			export CATALINA_HOME=${CATALINA_HOME}
+			export CATALINA_BASE=${CATALINA_BASE}
 			export CATALINA_PID=${CATALINA_PID}
 			export CATALINA_OPTS="${CATALINA_OPTS}"
 			$CATALINA_HOME/bin/catalina.sh start ${TOMCAT_START_OPTS}
@@ -185,6 +187,7 @@ stop_tomcat()
 			export JAVA_HOME=${JAVA_HOME}
 			export JAVA_OPTS="${JAVA_OPTS}"
 			export CATALINA_HOME=${CATALINA_HOME}
+			export CATALINA_BASE=${CATALINA_BASE}
 			export CATALINA_PID=${CATALINA_PID}
 			$CATALINA_HOME/bin/catalina.sh stop
 END_TOMCAT_STOP
@@ -335,6 +338,14 @@ Home directory of Tomcat.
 <content type="string" default="" />
 </parameter>
 
+<parameter name="catalina_base" unique="1">
+<longdesc lang="en">
+Instance directory of Tomcat
+</longdesc>
+<shortdesc>Instance directory of Tomcat, defaults to catalina_home</shortdesc>
+<content type="string" default="" />
+</parameter>
+
 <parameter name="catalina_pid" unique="1">
 <longdesc lang="en">
 A PID file name for Tomcat.
@@ -410,6 +421,7 @@ RESOURCE_STATUSURL="${OCF_RESKEY_statusurl-http://127.0.0.1:8080}";
 JAVA_HOME="${OCF_RESKEY_java_home}"
 JAVA_OPTS="${OCF_RESKEY_java_opts}"
 CATALINA_HOME="${OCF_RESKEY_catalina_home}"
+CATALINA_BASE="${OCF_RESKEY_catalina_base-${OCF_RESKEY_catalina_home}}"
 CATALINA_PID="${OCF_RESKEY_catalina_pid-$CATALINA_HOME/logs/catalina.pid}"
 
 TOMCAT_START_OPTS="${OCF_RESKEY_tomcat_start_opts}"
@@ -418,7 +430,7 @@ CATALINA_ROTATE_LOG="${OCF_RESKEY_catalina_rotate_log-NO}"
 CATALINA_ROTATETIME="${OCF_RESKEY_catalina_rotatetime-86400}"
 SEARCH_STR="\\""${CATALINA_OPTS}"
 
-export JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_PID CATALINA_OPTS
+export JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_BASE CATALINA_PID CATALINA_OPTS
 
 JAVA=${JAVA_HOME}/bin/java
 
-- 
1.7.1

From b4f9901de0d87cd380dac690fc1f274e526ce53f Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Tue, 18 Jan 2011 14:47:48 +0000
Subject: [PATCH 6/7] Med: tomcat: add timeout to monitor operation

wget is used as part of monitor operation, ensure timeout specified in
configuration is obeyed. This is also used during start operation, use
hard-coded 1s timeout for that (since its only meant to determine if
service is running or not).
---
 heartbeat/tomcat |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index 1248a97..dd4ea12 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -68,6 +68,7 @@ action:
 
 ############################################################################
 # Check tomcat service availability
+# $1 is timeout
 isrunning_tomcat()
 {
 	if ! have_binary $WGET; then
@@ -75,7 +76,9 @@ isrunning_tomcat()
 		ocf_log info "Please make sure that wget is available"
 		return $OCF_ERR_CONFIGURED
 	fi
-	$WGET -O /dev/null $RESOURCE_STATUSURL >/dev/null 2>&1
+	$WGET -O /dev/null -q -T $1 $RESOURCE_STATUSURL >/dev/null 2>&1 || return $OCF_ERR_GENERIC
+
+	return $OCF_SUCCESS
 }
 
 ############################################################################
@@ -84,15 +87,17 @@ isalive_tomcat()
 {
 	pgrep -f "${SEARCH_STR}" > /dev/null 
 }
+
 ############################################################################
 # Check tomcat process and service availability
+# $1 is timeout
 monitor_tomcat()
 {
+	MONITOR_TIMEOUT=${1-1}
+
 	isalive_tomcat ||
 		return $OCF_NOT_RUNNING
-	isrunning_tomcat ||
-		return $OCF_NOT_RUNNING
-	return $OCF_SUCCESS
+	isrunning_tomcat $MONITOR_TIMEOUT
 }
 
 ############################################################################
@@ -463,7 +468,7 @@ case "$COMMAND" in
 		;;
 	monitor)
 		#ocf_log debug  "[$TOMCAT_NAME] Enter tomcat monitor"
-		monitor_tomcat
+		monitor_tomcat ${OCF_RESKEY_CRM_timeout}
 		func_status=$?
 		#ocf_log debug  "[$TOMCAT_NAME] Leave tomcat monitor $func_status"
 		exit $func_status
-- 
1.7.1

From 67cbaeed384a9b2db61ccca44751c100a8a66e07 Mon Sep 17 00:00:00 2001
From: Brett Delle Grazie <[email protected]>
Date: Tue, 18 Jan 2011 15:46:26 +0000
Subject: [PATCH 7/7] Med: tomcat: Use Tomcat stop TIMEOUT -force to improve stop

The tomcat stop script can be told to forcefully terminate tomcat if it
doesn't shut down nicely within a specified period. Using this reduces
the stop case to almost a simple 'call tomcat stop script in blocking
mode'.  The timeout is set to slightly shorter than the stop operation
timeout. The tomcat stop script checks for and uses the PID file.
---
 heartbeat/tomcat |   67 ++++++++---------------------------------------------
 1 files changed, 10 insertions(+), 57 deletions(-)

diff --git a/heartbeat/tomcat b/heartbeat/tomcat
index dd4ea12..8fb2b2b 100755
--- a/heartbeat/tomcat
+++ b/heartbeat/tomcat
@@ -24,8 +24,6 @@
 # OCF parameters:
 #   OCF_RESKEY_tomcat_name - The name of the resource. Default is tomcat
 #   OCF_RESKEY_script_log  - A destination of the log of this script. Default /var/log/OCF_RESKEY_tomcat_name.log
-#   OCF_RESKEY_tomcat_stop_timeout  - Time-out at the time of the stop. Default is 5
-#   OCF_RESKEY_tomcat_suspend_trialcount  - The re-try number of times awaiting a stop. Default is 10
 #   OCF_RESKEY_tomcat_user  - A user name to start a resource. Default is root
 #   OCF_RESKEY_statusurl - URL for state confirmation. Default is http://127.0.0.1:8080
 #   OCF_RESKEY_java_home - Home directory of Java. Default is none
@@ -180,12 +178,19 @@ END_TOMCAT_START
 # Stop Tomcat
 stop_tomcat()
 {
+	TOMCAT_STOP_TIMEOUT=${OCF_RESKEY_CRM_timeout-5}
+	if [ $TOMCAT_STOP_TIMEOUT -gt 1 ]; then
+	    TOMCAT_STOP_TIMEOUT =`expr $TOMCAT_STOP_TIMEOUT - 1`
+	else
+	    TOMCAT_STOP_TIMEOUT = 1
+	fi
+
 	cd "$CATALINA_HOME/bin"
 
 	echo "`date "+%Y/%m/%d %T"`: stop  ###########################" >> "$TOMCAT_CONSOLE"
 
 	if [ "$RESOURCE_TOMCAT_USER" = RUNASIS ]; then
-		"$CATALINA_HOME/bin/catalina.sh" stop \
+		"$CATALINA_HOME/bin/catalina.sh" stop $TOMCAT_STOP_TIMEOUT -force \
 			>> "$TOMCAT_CONSOLE" 2>&1 &
 	else
 		cat<<-END_TOMCAT_STOP | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> "$TOMCAT_CONSOLE" 2>&1 &
@@ -194,7 +199,7 @@ stop_tomcat()
 			export CATALINA_HOME=${CATALINA_HOME}
 			export CATALINA_BASE=${CATALINA_BASE}
 			export CATALINA_PID=${CATALINA_PID}
-			$CATALINA_HOME/bin/catalina.sh stop
+			$CATALINA_HOME/bin/catalina.sh stop $TOMCAT_STOP_TIMEOUT -force
 END_TOMCAT_STOP
 	fi
 
@@ -202,40 +207,7 @@ END_TOMCAT_STOP
 	while isalive_tomcat; do
 		sleep 1
 		lapse_sec=`expr $lapse_sec + 1`
-		ocf_log debug "stop_tomcat[$TOMCAT_NAME]: stop NORM $lapse_sec/$TOMCAT_STOP_TIMEOUT"
-		if [ $lapse_sec -ge $TOMCAT_STOP_TIMEOUT ]; then
-			break
-		fi
-	done
-
-	if isalive_tomcat; then
-		lapse_sec=0
-		while true; do
-			sleep 1
-			lapse_sec=`expr $lapse_sec + 1`
-			ocf_log debug "stop_tomcat[$TOMCAT_NAME]: suspend tomcat by SIGTERM ($lapse_sec/$TOMCAT_SUSPEND_TRIALCOUNT)"
-			pkill -TERM -f "${SEARCH_STR}"
-			if isalive_tomcat; then
-				ocf_log debug "stop_tomcat[$TOMCAT_NAME]: suspend tomcat by SIGQUIT ($lapse_sec/$TOMCAT_SUSPEND_TRIALCOUNT)"
-				pkill -QUIT -f "${SEARCH_STR}"
-				if isalive_tomcat; then
-					if [ $lapse_sec -ge $TOMCAT_SUSPEND_TRIALCOUNT ]; then
-						break
-					fi
-				else
-					break
-				fi
-			else
-				break
-			fi
-		done
-	fi
-
-	lapse_sec=0
-	while isalive_tomcat; do
-		sleep 1
-		lapse_sec=`expr $lapse_sec + 1`
-		ocf_log debug "stop_tomcat[$TOMCAT_NAME]: suspend tomcat by SIGKILL ($lapse_sec)"
+		ocf_log debug "stop_tomcat[$TOMCAT_NAME]: stop failed, killing with SIGKILL ($lapse_sec)"
 		pkill -KILL -f "${SEARCH_STR}"
 	done
 
@@ -286,23 +258,6 @@ Log file, used during start and stop operations.
 <content type="string" default="" />
 </parameter>
 
-<parameter name="tomcat_stop_timeout" unique="0">
-<longdesc lang="en">
-Time-out for stop operation.
-</longdesc>
-<shortdesc>Time-out for the stop operation</shortdesc>
-<content type="integer" default="" />
-</parameter>
-
-<parameter name="tomcat_suspend_trialcount" unique="0">
-<longdesc lang="en">
-Maximum number of times to retry stop operation before suspending
-and killing Tomcat.
-</longdesc>
-<shortdesc>Max retry count for stop operation</shortdesc>
-<content type="integer" default="" />
-</parameter>
-
 <parameter name="tomcat_user" unique="0">
 <longdesc lang="en">
 The user who starts Tomcat.
@@ -418,8 +373,6 @@ validate_all_tomcat()
 
 TOMCAT_NAME="${OCF_RESKEY_tomcat_name-tomcat}"
 TOMCAT_CONSOLE="${OCF_RESKEY_script_log-/var/log/$TOMCAT_NAME.log}"
-TOMCAT_STOP_TIMEOUT="${OCF_RESKEY_tomcat_stop_timeout-5}"
-TOMCAT_SUSPEND_TRIALCOUNT="${OCF_RESKEY_tomcat_suspend_trialcount-10}"
 RESOURCE_TOMCAT_USER="${OCF_RESKEY_tomcat_user-RUNASIS}"
 RESOURCE_STATUSURL="${OCF_RESKEY_statusurl-http://127.0.0.1:8080}";
 
-- 
1.7.1

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to