summaryrefslogtreecommitdiffstats
path: root/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example
diff options
context:
space:
mode:
Diffstat (limited to 'rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example')
-rw-r--r--rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.properties.default23
-rw-r--r--rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.xml111
-rw-r--r--rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.txt25
-rw-r--r--rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.xml49
4 files changed, 208 insertions, 0 deletions
diff --git a/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.properties.default b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.properties.default
new file mode 100644
index 00000000..4e3f0460
--- /dev/null
+++ b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.properties.default
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+jkstatus.host=localhost
+jkstatus.port=2090
+jkstatus.username=manager
+jkstatus.password=tomcat
+jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
+jkstatus.testlb=loadbalancer
+jkstatus.testworker=node01
+catalina.home=../../../../build/build \ No newline at end of file
diff --git a/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.xml b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.xml
new file mode 100644
index 00000000..7f4c1b4d
--- /dev/null
+++ b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/jkstatus.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- @author Peter Rossbach -->
+
+<project name="status"
+ default="status" basedir=".">
+
+ <property name="profile" value=""/>
+ <property file="jkstatus${profile}.properties"/>
+ <property file="jkstatus${profile}.properties.default"/>
+
+ <path id="jkstatus.path">
+ <fileset dir="${catalina.home}/bin">
+ <include name="commons-logging-api-*.jar"/>
+ </fileset>
+ <pathelement location="${catalina.home}/server/lib/catalina-ant.jar"/>
+ <pathelement location="../dist/tomcat-jkstatus-ant.jar"/>
+ <pathelement location="${catalina.home}/server/lib/tomcat-util.jar"/>
+ </path>
+
+ <taskdef resource="org/apache/jk/status/jkstatus.tasks">
+ <classpath refid="jkstatus.path"/>
+ </taskdef>
+
+ <!--
+ ########################################################################################################
+ public
+ ########################################################################################################
+ -->
+ <target name="status"
+ depends="-status-modjk-access"
+ description="got jk status" />
+
+ <target name="reset"
+ depends="-status-modjk-reset"
+ description="reset jk status" />
+
+ <!--
+ ########################################################################################################
+ private
+ ########################################################################################################
+ -->
+ <target name="-status-modjk-access">
+ <jkStatus url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ resultproperty="jkstatus.before"
+ echo="on"
+ failOnError="off"/>
+ <echoproperties prefix="jkstatus" />
+ <jkUpdateWorker url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ loadbalancer="${jkstatus.testlb}"
+ worker="${jkstatus.testworker}"
+ domain="d20"
+ />
+ <jkUpdateLoadbalancer url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ loadbalancer="${jkstatus.testlb}"
+ method="Sessions"
+ />
+ <jkStatus url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ resultproperty="workerafter"
+ failOnError="false"/>
+ <echoproperties prefix="jkstatus.after" />
+ </target>
+
+ <target name="-status-modjk-reset">
+ <jkStatus url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ resultproperty="jkstatus.before"
+ failOnError="false"/>
+ <echoproperties prefix="jkstatus.before" />
+
+ <jkReset url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ loadbalancer="${jkstatus.testlb}"
+ worker="${jkstatus.testworker}"
+ />
+
+ <jkStatus url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ resultproperty="jkstatus.after"
+ failOnError="false"/>
+ <echoproperties prefix="jkstatus.after" />
+ </target>
+
+
+</project>
diff --git a/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.txt b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.txt
new file mode 100644
index 00000000..9fffb7dd
--- /dev/null
+++ b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.txt
@@ -0,0 +1,25 @@
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+How to use the show example:
+ant -f show.xml
+Configure mod_jk (httpd.conf and workers.properties):
+JkMount /jkstatus jkstatus
+
+worker.list=jkstatus
+worker.jkstatus.type=status
+
+Adjust jkstatus.properties.default:
+jkstatus.port (for example).
diff --git a/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.xml b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.xml
new file mode 100644
index 00000000..897745a9
--- /dev/null
+++ b/rubbos/app/tomcat-connectors-1.2.32-src/jkstatus/example/show.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="modjk-status"
+ xmlns:jk="urn:org-apache-jk-status"
+ default="status" basedir=".">
+
+ <property name="profile" value=""/>
+ <property file="jkstatus${profile}.properties"/>
+ <property file="jkstatus.properties.default"/>
+
+ <path id="jkstatus.classpath">
+ <fileset dir="${catalina.home}/bin">
+ <include name="commons-logging-api-*.jar"/>
+ </fileset>
+ <pathelement location="${catalina.home}/server/lib/catalina-ant.jar"/>
+ <!--<pathelement location="${catalina.home}/server/lib/tomcat-jkstatus-ant.jar"/>-->
+ <pathelement location="../dist/tomcat-jkstatus-ant.jar"/>
+ <pathelement location="${catalina.home}/server/lib/tomcat-util.jar"/>
+ </path>
+
+ <typedef resource="org/apache/jk/status/antlib.xml"
+ uri="urn:org-apache-jk-status" classpathref="jkstatus.classpath"/>
+
+ <target name="status" >
+ <jk:status url="${jkstatus.url}"
+ username="${jkstatus.username}"
+ password="${jkstatus.password}"
+ resultproperty="worker"
+ echo="off"
+ failOnError="off"/>
+ <echoproperties prefix="worker" />
+ </target>
+</project>