Issue #2133 - qpid is now a wrapped java application; incremented qpid release
- Amend: wes2bridge compatibility updates - Amend: running deploy.xml in the yajsw project will now deploy it to both its EDEX and QPID destination - Amend: fixed monitoring in qpid wrapper.conf - Amend: no longer restart qpid when >= 90% of the heap is used - Amend: specify maximum memory directly in wrapper.conf Change-Id: I2e3e6881f456535bac08f51f1e541e708be20f58 Former-commit-id:38aa7723c6
[formerly 24c451a8afbd1b406ee7f83997e0ab92f1625b89] Former-commit-id:f6412117e1
This commit is contained in:
parent
f484a47d43
commit
1932480e2b
14 changed files with 352 additions and 58 deletions
Binary file not shown.
Binary file not shown.
|
@ -11,11 +11,11 @@
|
||||||
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
|
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
|
||||||
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.configuration.ConfigurationUtility"/>
|
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.configuration.ConfigurationUtility"/>
|
||||||
<attribute name="Class-Path" value="."/>
|
<attribute name="Class-Path" value="."/>
|
||||||
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.1.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
|
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.2.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
|
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
|
||||||
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
|
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
|
||||||
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.1.jar"/>
|
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.2.jar"/>
|
||||||
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
|
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
|
||||||
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/>
|
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/>
|
||||||
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/>
|
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/>
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
|
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
|
||||||
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.manager.Wes2BridgeManager"/>
|
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.manager.Wes2BridgeManager"/>
|
||||||
<attribute name="Class-Path" value="."/>
|
<attribute name="Class-Path" value="."/>
|
||||||
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.1.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
|
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.2.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
|
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
|
||||||
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
|
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
|
||||||
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.1.jar"/>
|
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.2.jar"/>
|
||||||
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
|
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
|
||||||
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/>
|
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/>
|
||||||
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/>
|
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/>
|
||||||
|
|
|
@ -64,6 +64,7 @@ import com.raytheon.wes2bridge.common.configuration.Wes2BridgeConfiguration;
|
||||||
* Jan 18, 2012 1490 bkowal Pypies is now added to each
|
* Jan 18, 2012 1490 bkowal Pypies is now added to each
|
||||||
* edex-environment instance
|
* edex-environment instance
|
||||||
* Apr 18, 2013 1899 bkowal Updates qpid 0.18 configuration now.
|
* Apr 18, 2013 1899 bkowal Updates qpid 0.18 configuration now.
|
||||||
|
* July 2, 2013 2133 bkowal Updates for yajsw-wrapped qpid
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -440,23 +441,11 @@ public class Wes2BridgeManager {
|
||||||
BufferedWriter bw = this.getBufferedWriter(qpidd);
|
BufferedWriter bw = this.getBufferedWriter(qpidd);
|
||||||
|
|
||||||
final String line1 = "QPID_HOME=";
|
final String line1 = "QPID_HOME=";
|
||||||
/*
|
|
||||||
* Need to update the 'ps' command that determines if qpid is running or
|
|
||||||
* not.
|
|
||||||
*/
|
|
||||||
final String line2 = "isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c \"PNAME=QPBRKR \"`";
|
|
||||||
|
|
||||||
String line = StringUtils.EMPTY;
|
String line = StringUtils.EMPTY;
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
if (line.startsWith(line1)) {
|
if (line.startsWith(line1)) {
|
||||||
line = line1 + qpidDirectory;
|
line = line1 + qpidDirectory;
|
||||||
} else if (line.contains(line2)) {
|
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
|
||||||
stringBuilder
|
|
||||||
.append("isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep QPID_HOME=");
|
|
||||||
stringBuilder.append(qpidDirectory);
|
|
||||||
stringBuilder.append("| grep -c \"PNAME=QPBRKR \"`");
|
|
||||||
line = stringBuilder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bw.write(line + "\n");
|
bw.write(line + "\n");
|
||||||
|
|
89
javaUtilities/yajsw/deploy.xml
Normal file
89
javaUtilities/yajsw/deploy.xml
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
<project default="main" basedir=".">
|
||||||
|
<!--
|
||||||
|
determine where the various destination directories are
|
||||||
|
without ant-contrib
|
||||||
|
-->
|
||||||
|
<!-- the EDEX destination -->
|
||||||
|
<available file="${basedir}/../build.edex"
|
||||||
|
property="edex.destination"
|
||||||
|
value="${basedir}/../build.edex" />
|
||||||
|
<available file="${basedir}/../../edexOsgi/build.edex"
|
||||||
|
property="edex.destination"
|
||||||
|
value="${basedir}/../../edexOsgi/build.edex" />
|
||||||
|
|
||||||
|
<!-- the QPID destination -->
|
||||||
|
<available file="${basedir}/../rpms/awips2.qpid/0.18"
|
||||||
|
property="qpid.destination"
|
||||||
|
value="${basedir}/../rpms/awips2.qpid/0.18" />
|
||||||
|
<available file="${basedir}/../../rpms/awips2.qpid/0.18"
|
||||||
|
property="qpid.destination"
|
||||||
|
value="${basedir}/../../rpms/awips2.qpid/0.18" />
|
||||||
|
|
||||||
|
<!-- yajsw gradle directories -->
|
||||||
|
<property name="gradle.script"
|
||||||
|
value="gradlew.sh" />
|
||||||
|
|
||||||
|
<property name="build.libs.directory"
|
||||||
|
value="build/libs" />
|
||||||
|
|
||||||
|
<property name="build.gradle.directory"
|
||||||
|
value="${basedir}/build/gradle" />
|
||||||
|
|
||||||
|
<property name="gradle.libs.directory"
|
||||||
|
value="${basedir}/lib" />
|
||||||
|
|
||||||
|
<property name="wrapperApp.artifact"
|
||||||
|
value="${build.gradle.directory}/wrapper-app/${build.libs.directory}/wrapperApp.jar" />
|
||||||
|
<property name="wrapper.artifact"
|
||||||
|
value="${build.gradle.directory}/wrapper/${build.libs.directory}/wrapper.jar" />
|
||||||
|
|
||||||
|
<property name="edex.bin.directory"
|
||||||
|
value="${edex.destination}/esb/bin" />
|
||||||
|
<property name="edex.yajsw.directory"
|
||||||
|
value="${edex.bin.directory}/yajsw" />
|
||||||
|
|
||||||
|
<!-- end of properties -->
|
||||||
|
|
||||||
|
<target name="main">
|
||||||
|
<antcall target="build" />
|
||||||
|
<antcall target="deploy" />
|
||||||
|
<antcall target="clean" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="build">
|
||||||
|
<exec executable="/bin/bash" dir="${build.gradle.directory}">
|
||||||
|
<arg value="${build.gradle.directory}/${gradle.script}" />
|
||||||
|
<arg value="build" />
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<echo message="${wrapper.artifact}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="deploy">
|
||||||
|
<!-- deploy to EDEX -->
|
||||||
|
<copy todir="${edex.yajsw.directory}"
|
||||||
|
verbose="true" overwrite="true">
|
||||||
|
<fileset file="${wrapper.artifact}" />
|
||||||
|
<fileset file="${wrapperApp.artifact}" />
|
||||||
|
</copy>
|
||||||
|
<copy todir="${edex.yajsw.directory}/lib"
|
||||||
|
verbose="true" overwrite="true">
|
||||||
|
<fileset dir="${gradle.libs.directory}">
|
||||||
|
<include name="core/**" />
|
||||||
|
<exclude name="**/ReadMe.txt" />
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<!-- deploy to QPID -->
|
||||||
|
<tar destfile="${qpid.destination}/SOURCES/yajsw-distribution.tar"
|
||||||
|
basedir="${edex.bin.directory}"
|
||||||
|
includes="yajsw/**">
|
||||||
|
</tar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clean">
|
||||||
|
<exec executable="/bin/bash" dir="${build.gradle.directory}">
|
||||||
|
<arg value="${build.gradle.directory}/${gradle.script}" />
|
||||||
|
<arg value="clean" />
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -68,7 +68,7 @@ diff -crB a/qpid/java/build.deps b/qpid/java/build.deps
|
||||||
commons-cli=lib/required/commons-cli-1.2.jar
|
commons-cli=lib/required/commons-cli-1.2.jar
|
||||||
! commons-codec=lib/required/commons-codec-1.6.jar
|
! commons-codec=lib/required/commons-codec-1.6.jar
|
||||||
commons-collections=lib/required/commons-collections-3.2.1.jar
|
commons-collections=lib/required/commons-collections-3.2.1.jar
|
||||||
! commons-configuration=lib/required/commons-configuration-1.8.jar
|
commons-configuration=lib/required/commons-configuration-1.8.jar
|
||||||
commons-digester=lib/required/commons-digester-1.8.1.jar
|
commons-digester=lib/required/commons-digester-1.8.1.jar
|
||||||
! commons-lang=lib/required/commons-lang-2.6.jar
|
! commons-lang=lib/required/commons-lang-2.6.jar
|
||||||
commons-logging=lib/required/commons-logging-1.1.1.jar
|
commons-logging=lib/required/commons-logging-1.1.1.jar
|
||||||
|
@ -80,7 +80,7 @@ diff -crB a/qpid/java/build.deps b/qpid/java/build.deps
|
||||||
commons-cli=lib/required/commons-cli-1.2.jar
|
commons-cli=lib/required/commons-cli-1.2.jar
|
||||||
! commons-codec=lib/required/commons-codec-1.4.jar
|
! commons-codec=lib/required/commons-codec-1.4.jar
|
||||||
commons-collections=lib/required/commons-collections-3.2.1.jar
|
commons-collections=lib/required/commons-collections-3.2.1.jar
|
||||||
! commons-configuration=lib/required/commons-configuration-1.6.jar
|
commons-configuration=lib/required/commons-configuration-1.8.jar
|
||||||
commons-digester=lib/required/commons-digester-1.8.1.jar
|
commons-digester=lib/required/commons-digester-1.8.1.jar
|
||||||
! commons-lang=lib/required/commons-lang-2.3.jar
|
! commons-lang=lib/required/commons-lang-2.3.jar
|
||||||
commons-logging=lib/required/commons-logging-1.1.1.jar
|
commons-logging=lib/required/commons-logging-1.1.1.jar
|
||||||
|
|
Binary file not shown.
|
@ -7,7 +7,6 @@ org.apache.commons.digester/commons-digester-1.8.1.jar
|
||||||
org.apache.commons.codec/commons-codec-1.4.jar
|
org.apache.commons.codec/commons-codec-1.4.jar
|
||||||
org.apache.commons.lang/commons-lang-2.3.jar
|
org.apache.commons.lang/commons-lang-2.3.jar
|
||||||
org.apache.commons.collections/commons-collections-3.2.jar
|
org.apache.commons.collections/commons-collections-3.2.jar
|
||||||
org.apache.commons.configuration/commons-configuration-1.6.jar
|
|
||||||
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
|
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
|
||||||
org.codehaus.jackson/jackson-mapper-asl-1.7.3.jar
|
org.codehaus.jackson/jackson-mapper-asl-1.7.3.jar
|
||||||
org.junit/mockito-all-1.9.0.jar
|
org.junit/mockito-all-1.9.0.jar
|
||||||
|
|
51
rpms/awips2.qpid/0.18/SOURCES/qpid-wrapper
Normal file
51
rpms/awips2.qpid/0.18/SOURCES/qpid-wrapper
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
# this version of the qpid start script will utilize the yajsw wrapper
|
||||||
|
|
||||||
|
CONF_FILE="wrapper.conf"
|
||||||
|
|
||||||
|
WHEREAMI=`dirname $0`
|
||||||
|
if [ -z "$QPID_HOME" ]; then
|
||||||
|
export QPID_HOME=`cd $WHEREAMI/../ && pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$QPID_WORK" ]; then
|
||||||
|
export QPID_WORK=$QPID_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${QPID_PID_FILENAME}" ]; then
|
||||||
|
export QPID_PID_FILENAME="qpid-server.pid"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set other variables used by the wrapper
|
||||||
|
export JAVA=/awips2/java/bin/java \
|
||||||
|
JAVA_VM=-server \
|
||||||
|
AMQJ_LOGGING_LEVEL=info \
|
||||||
|
QPID_PNAME=" -DPNAME=QPBRKR" \
|
||||||
|
CONSOLE_LOGLEVEL=DEBUG
|
||||||
|
|
||||||
|
if [ ! -f ${JAVA} ]; then
|
||||||
|
echo "ERROR: the specified Java does not exist - ${JAVA}."
|
||||||
|
echo "Unable to Continue ... Terminating."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$JAVA -jar ${QPID_HOME}/bin/yajsw/wrapper.jar -c ${QPID_HOME}/conf/${CONF_FILE}
|
|
@ -19,7 +19,7 @@
|
||||||
[ ${NETWORKING} = "no" ] && exit 0
|
[ ${NETWORKING} = "no" ] && exit 0
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
prog="qpid-server"
|
prog="qpid-wrapper"
|
||||||
|
|
||||||
# Who to run QPID as, usually "awips". (NOT "root")
|
# Who to run QPID as, usually "awips". (NOT "root")
|
||||||
QPIDUSER=awips
|
QPIDUSER=awips
|
||||||
|
@ -28,17 +28,37 @@ QPIDUSER=awips
|
||||||
TODAY=`/bin/date +%Y%m%d`
|
TODAY=`/bin/date +%Y%m%d`
|
||||||
|
|
||||||
QPID_HOME=/awips2/qpid
|
QPID_HOME=/awips2/qpid
|
||||||
|
wrapper_process="org.rzo.yajsw.app.WrapperJVMMain"
|
||||||
|
_wrapper_jar=${QPID_HOME}/bin/yajsw/wrapper.jar
|
||||||
|
|
||||||
export QPID_JAVA_MEM=-Xmx2048m
|
function getQPID_psCount()
|
||||||
|
{
|
||||||
|
psCount_qpid=`ps -ef | grep ${wrapper_process} | grep QPID_HOME="${QPID_HOME}" | grep -c "PNAME=QPBRKR "`
|
||||||
|
}
|
||||||
|
|
||||||
|
function getQPID_pid()
|
||||||
|
{
|
||||||
|
pid_qpid=`ps -e -o pid,args | grep ${wrapper_process} | grep QPID_HOME="${QPID_HOME}" | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWrapper_psCount()
|
||||||
|
{
|
||||||
|
psCount_wrapper=`ps -ef | grep "${_wrapper_jar} -c" | grep -c wrapper.conf`
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWrapper_pid()
|
||||||
|
{
|
||||||
|
pid_wrapper=`ps -e -o pid,args | grep "${_wrapper_jar} -c" | grep wrapper.conf | grep -e "^ *\([0-9]\+\)" -o`
|
||||||
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "`
|
getQPID_psCount
|
||||||
if [ $isRunning -eq 1 ]; then
|
if [ ${psCount_qpid} -eq 1 ]; then
|
||||||
echo "WARNING: QPID already running, not starting another instance"
|
echo "WARNING: QPID already running, not starting another instance"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DAEMON="${QPID_HOME}/bin/qpid-server"
|
DAEMON="/bin/bash ${QPID_HOME}/bin/${prog}"
|
||||||
|
|
||||||
QPIDSTARTLOG=${QPID_HOME}/log/start-qpid-$TODAY.log
|
QPIDSTARTLOG=${QPID_HOME}/log/start-qpid-$TODAY.log
|
||||||
su $QPIDUSER -c "$DAEMON" >> $QPIDSTARTLOG 2>&1 &
|
su $QPIDUSER -c "$DAEMON" >> $QPIDSTARTLOG 2>&1 &
|
||||||
|
@ -47,35 +67,47 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "`
|
# determine if qpid is running, first.
|
||||||
|
getQPID_psCount
|
||||||
|
if [ ${psCount_qpid} -ne 1 ]; then
|
||||||
|
echo "WARNING: Qpid is not running, no shutdown attempted!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
# get the qpid pid
|
||||||
|
getQPID_pid
|
||||||
|
|
||||||
if [ $isRunning -eq 1 ]; then
|
# determine if the qpid wrapper is running.
|
||||||
pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
|
getWrapper_psCount
|
||||||
kill $pid
|
if [ ${psCount_wrapper} -eq 1 ]; then
|
||||||
|
# get the wrapper pid
|
||||||
|
getWrapper_pid
|
||||||
|
|
||||||
CNT=0
|
# stop the wrapper
|
||||||
while [[ "X$pid" != "X" ]]; do
|
kill ${pid_wrapper}
|
||||||
if [ "$CNT" -ge "15" ]; then
|
|
||||||
echo "QPID did not shut down gracefully in 15 seconds, force shutting down"
|
|
||||||
kill -9 $pid
|
|
||||||
else
|
else
|
||||||
let CNT=${CNT}+1
|
# stop qpid
|
||||||
|
kill ${pid_qpid}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# wait for and verify that qpid has stopped running
|
||||||
|
savepid=${pid_qpid}
|
||||||
|
while [ "X${pid_qpid}" != "X" ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "QPID is not running"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
getQPID_psCount
|
||||||
|
if [ ${psCount_qpid} -eq 1 ]; then
|
||||||
|
pid_qpid=${savepid}
|
||||||
|
else
|
||||||
|
pid_qpid=""
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
checkStatus() {
|
checkStatus() {
|
||||||
isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "`
|
getQPID_psCount
|
||||||
if [ $isRunning -eq 1 ]; then
|
if [ ${psCount_qpid} -eq 1 ]; then
|
||||||
pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
|
getQPID_pid
|
||||||
echo "QPID is running (PID $pid)"
|
echo "QPID is running (PID ${pid_qpid})"
|
||||||
else
|
else
|
||||||
echo "QPID is not running"
|
echo "QPID is not running"
|
||||||
fi
|
fi
|
||||||
|
|
121
rpms/awips2.qpid/0.18/SOURCES/wrapper.conf
Normal file
121
rpms/awips2.qpid/0.18/SOURCES/wrapper.conf
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
#********************************************************************
|
||||||
|
##
|
||||||
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
|
#
|
||||||
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
|
# This software product contains export-restricted data whose
|
||||||
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
|
# an export license or other authorization.
|
||||||
|
#
|
||||||
|
# Contractor Name: Raytheon Company
|
||||||
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
|
# Mail Stop B8
|
||||||
|
# Omaha, NE 68106
|
||||||
|
# 402.291.0100
|
||||||
|
#
|
||||||
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
|
# further licensing information.
|
||||||
|
##
|
||||||
|
# Wrapper Properties
|
||||||
|
#********************************************************************
|
||||||
|
|
||||||
|
wrapper.debug=false
|
||||||
|
set.default.QPID_HOME=../..
|
||||||
|
wrapper.working.dir=/awips2/qpid/bin
|
||||||
|
# required due to java bug:
|
||||||
|
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4388188
|
||||||
|
# not sure if the yajsw developers have any intention of
|
||||||
|
# implementing the work-around (solution?) stated in the
|
||||||
|
# ticket.
|
||||||
|
wrapper.fork_hack=true
|
||||||
|
# at a minimum: prevents the printing of the "Invalid parameter" messages
|
||||||
|
wrapper.console.pipestreams=true
|
||||||
|
|
||||||
|
# Java Application
|
||||||
|
wrapper.java.command=/awips2/java/bin/java
|
||||||
|
|
||||||
|
# Java Classpath (include wrapper.jar) Add class path elements as
|
||||||
|
# needed starting from 1
|
||||||
|
wrapper.java.classpath.1=${QPID_HOME}/bin/yajsw/wrapper.jar
|
||||||
|
|
||||||
|
# include ANY jar files that are found in the locations denoted by
|
||||||
|
# wrapper.search.java.classpath.#
|
||||||
|
wrapper.search.java.classpath.1=${QPID_HOME}/lib/opt
|
||||||
|
wrapper.search.java.classpath.2=${QPID_HOME}/lib/opt/qpid-deps
|
||||||
|
|
||||||
|
# garbage collection settings
|
||||||
|
wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC
|
||||||
|
wrapper.java.additional.gc.2=-XX:+HeapDumpOnOutOfMemoryError
|
||||||
|
|
||||||
|
# the main qpid java class that will be started
|
||||||
|
wrapper.java.app.mainclass=org.apache.qpid.server.Main
|
||||||
|
|
||||||
|
# Java Additional Parameters
|
||||||
|
# note that n is the parameter number starting from 1.
|
||||||
|
wrapper.java.additional.1=${JAVA_VM}
|
||||||
|
wrapper.java.additional.2=${QPID_PNAME}
|
||||||
|
wrapper.java.additional.3=-Damqj.logging.level=${AMQJ_LOGGING_LEVEL}
|
||||||
|
wrapper.java.additional.4=-DQPID_HOME=${QPID_HOME}
|
||||||
|
wrapper.java.additional.5=-DQPID_WORK=${QPID_WORK}
|
||||||
|
wrapper.java.additional.6=-Damqj.read_write_pool_size=32
|
||||||
|
|
||||||
|
# Maximum Java Heap Size (in MB)
|
||||||
|
wrapper.java.maxmemory=2048
|
||||||
|
|
||||||
|
wrapper.ping.timeout=300
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# Monitor the Application
|
||||||
|
#********************************************************************
|
||||||
|
wrapper.java.monitor.heap = true
|
||||||
|
# warning messages will be logged; it is also possible to send an e-mail
|
||||||
|
wrapper.java.monitor.heap.threshold.percent = 90
|
||||||
|
|
||||||
|
wrapper.java.monitor.deadlock = true
|
||||||
|
wrapper.filter.trigger.deadlock.restart=wrapper.java.monitor.deadlock: DEADLOCK IN THREADS:
|
||||||
|
wrapper.filter.action.deadlock.restart=RESTART
|
||||||
|
|
||||||
|
# restart the application if it runs out of memory
|
||||||
|
wrapper.filter.trigger.1=java.lang.OutOfMemoryError
|
||||||
|
wrapper.filter.action.1=RESTART
|
||||||
|
|
||||||
|
# restart the application if it crashes
|
||||||
|
wrapper.on_exit.default=RESTART
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# Wrapper Logging Properties
|
||||||
|
#********************************************************************
|
||||||
|
# Format of output for the console. (See docs for formats)
|
||||||
|
wrapper.console.format=M
|
||||||
|
|
||||||
|
# Log file to use for wrapper output logging.
|
||||||
|
wrapper.logfile=${QPID_HOME}/log/qpid-wrapper-YYYYMMDD.log
|
||||||
|
|
||||||
|
# Format of output for the log file. (See docs for formats)
|
||||||
|
wrapper.logfile.format=M
|
||||||
|
|
||||||
|
# Log Level for log file output. (See docs for log levels)
|
||||||
|
wrapper.logfile.loglevel=INFO
|
||||||
|
|
||||||
|
# Set the log rollover mode for the log.
|
||||||
|
# DATE - creates a new file each day - file name must include YYYYMMDD.
|
||||||
|
# SIZE - uses log size for log roll-over.
|
||||||
|
wrapper.logfile.rollmode=DATE
|
||||||
|
|
||||||
|
# Maximum number of rolled log files which will be allowed before old
|
||||||
|
# files are deleted. The default value of 0 implies no limit.
|
||||||
|
wrapper.logfile.maxfiles=7
|
||||||
|
|
||||||
|
# Log Level for console output. (See docs for log levels)
|
||||||
|
wrapper.console.loglevel=${CONSOLE_LOGLEVEL}
|
||||||
|
|
||||||
|
# Log Level for log file output. (See docs for log levels)
|
||||||
|
wrapper.logfile.loglevel=INFO
|
||||||
|
|
||||||
|
#********************************************************************
|
||||||
|
# Wrapper Windows Properties
|
||||||
|
#********************************************************************
|
||||||
|
# Title to use when running as a console
|
||||||
|
wrapper.console.title=QPID
|
BIN
rpms/awips2.qpid/0.18/SOURCES/yajsw-distribution.tar
Normal file
BIN
rpms/awips2.qpid/0.18/SOURCES/yajsw-distribution.tar
Normal file
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
diff -crB a/qpid-java.spec b/qpid-java.spec
|
diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
*** a/qpid-java.spec 2013-05-14 20:24:21.000000000 -0500
|
*** a/qpid-java.spec 2013-06-26 13:14:00.000000000 -0500
|
||||||
--- b/qpid-java.spec 2013-05-14 20:23:49.000000000 -0500
|
--- b/qpid-java.spec 2013-06-26 13:12:59.000000000 -0500
|
||||||
***************
|
***************
|
||||||
*** 1,6 ****
|
*** 1,6 ****
|
||||||
! Name: qpid-java
|
! Name: qpid-java
|
||||||
|
@ -14,13 +14,13 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
!
|
!
|
||||||
! Name: awips2-qpid-java
|
! Name: awips2-qpid-java
|
||||||
Version: 0.18
|
Version: 0.18
|
||||||
! Release: 1%{?dist}
|
! Release: 3%{?dist}
|
||||||
Summary: Java implementation of Apache Qpid
|
Summary: Java implementation of Apache Qpid
|
||||||
License: Apache Software License
|
License: Apache Software License
|
||||||
Group: Development/Java
|
Group: Development/Java
|
||||||
***************
|
***************
|
||||||
*** 12,21 ****
|
*** 12,21 ****
|
||||||
--- 14,28 ----
|
--- 14,31 ----
|
||||||
Source0: %{qpid_src_dir}.tar.gz
|
Source0: %{qpid_src_dir}.tar.gz
|
||||||
Source1: qpid-build-deps-%{version}.tar.gz
|
Source1: qpid-build-deps-%{version}.tar.gz
|
||||||
Source2: %{qpid_deps_src_dir}.tar.gz
|
Source2: %{qpid_deps_src_dir}.tar.gz
|
||||||
|
@ -28,6 +28,9 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
+ Source4: virtualhosts.xml
|
+ Source4: virtualhosts.xml
|
||||||
+ Source5: qpidd
|
+ Source5: qpidd
|
||||||
+ Source6: log4j.xml
|
+ Source6: log4j.xml
|
||||||
|
+ Source7: qpid-wrapper
|
||||||
|
+ Source8: wrapper.conf
|
||||||
|
+ Source9: yajsw-distribution.tar
|
||||||
|
|
||||||
Patch0: mrg.patch
|
Patch0: mrg.patch
|
||||||
Patch1: examples.patch
|
Patch1: examples.patch
|
||||||
|
@ -49,7 +52,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
Requires: log4j >= 1.2.12
|
Requires: log4j >= 1.2.12
|
||||||
|
|
||||||
%description client
|
%description client
|
||||||
--- 42,61 ----
|
--- 45,64 ----
|
||||||
%description common
|
%description common
|
||||||
Java implementation of Apache Qpid - common files
|
Java implementation of Apache Qpid - common files
|
||||||
|
|
||||||
|
@ -79,7 +82,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
|
|
||||||
%description example
|
%description example
|
||||||
Java implementation of Apache Qpid - example
|
Java implementation of Apache Qpid - example
|
||||||
--- 65,71 ----
|
--- 68,74 ----
|
||||||
Summary: Java implementation of Apache Qpid - example
|
Summary: Java implementation of Apache Qpid - example
|
||||||
Group: Development/Java
|
Group: Development/Java
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
@ -89,7 +92,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
Java implementation of Apache Qpid - example
|
Java implementation of Apache Qpid - example
|
||||||
***************
|
***************
|
||||||
*** 58,67 ****
|
*** 58,67 ****
|
||||||
--- 74,98 ----
|
--- 77,101 ----
|
||||||
%setup -q -n %{qpid_src_dir}
|
%setup -q -n %{qpid_src_dir}
|
||||||
mkdir -p java/lib/required
|
mkdir -p java/lib/required
|
||||||
tar -xvzf %SOURCE1 -C java/lib/required
|
tar -xvzf %SOURCE1 -C java/lib/required
|
||||||
|
@ -124,7 +127,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
|
|
||||||
# blacklisted jars are either provided by the Requires: or not needed.
|
# blacklisted jars are either provided by the Requires: or not needed.
|
||||||
BLACKLIST="slf4j qpid-client-tests qpid-all qpid-common-tests"
|
BLACKLIST="slf4j qpid-client-tests qpid-all qpid-common-tests"
|
||||||
--- 101,115 ----
|
--- 104,118 ----
|
||||||
|
|
||||||
(
|
(
|
||||||
cd %{qpid_src_dir}/java
|
cd %{qpid_src_dir}/java
|
||||||
|
@ -189,7 +192,7 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Sep 6 2012 Irina Boverman <iboverma@redhat.com> - 0.18-2
|
* Thu Sep 6 2012 Irina Boverman <iboverma@redhat.com> - 0.18-2
|
||||||
--- 123,234 ----
|
--- 126,247 ----
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
@ -214,6 +217,14 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
! # scripts for broker
|
! # scripts for broker
|
||||||
! install -dm 755 %{buildroot}%{_awips2_directory}/bin
|
! install -dm 755 %{buildroot}%{_awips2_directory}/bin
|
||||||
! install -pm 644 %{qpid_src_dir}/java/build/bin/* %{buildroot}%{_awips2_directory}/bin
|
! install -pm 644 %{qpid_src_dir}/java/build/bin/* %{buildroot}%{_awips2_directory}/bin
|
||||||
|
! # install the wrapper script
|
||||||
|
! install -pm 644 %SOURCE7 %{buildroot}%{_awips2_directory}/bin
|
||||||
|
! # add the yajsw distribution
|
||||||
|
! tar -xf %SOURCE9 -C %{buildroot}%{_awips2_directory}/bin
|
||||||
|
!
|
||||||
|
! # wrapper configuration
|
||||||
|
! install -dm 755 %{buildroot}%{_awips2_directory}/conf
|
||||||
|
! install -pm 644 %SOURCE8 %{buildroot}%{_awips2_directory}/conf
|
||||||
!
|
!
|
||||||
! # service script
|
! # service script
|
||||||
! mkdir -p %{buildroot}/etc/init.d
|
! mkdir -p %{buildroot}/etc/init.d
|
||||||
|
@ -288,6 +299,8 @@ diff -crB a/qpid-java.spec b/qpid-java.spec
|
||||||
! /awips2/qpid/lib/opt/qpid-broker-plugins-firewall-%{version}.jar
|
! /awips2/qpid/lib/opt/qpid-broker-plugins-firewall-%{version}.jar
|
||||||
! /awips2/qpid/lib/opt/qpid-broker-plugins-management-http-%{version}.jar
|
! /awips2/qpid/lib/opt/qpid-broker-plugins-management-http-%{version}.jar
|
||||||
! %dir /awips2/qpid/log
|
! %dir /awips2/qpid/log
|
||||||
|
! %dir /awips2/qpid/conf
|
||||||
|
! /awips2/qpid/conf/*
|
||||||
! %defattr(755,awips,fxalpha,755)
|
! %defattr(755,awips,fxalpha,755)
|
||||||
! %dir /awips2/qpid/bin
|
! %dir /awips2/qpid/bin
|
||||||
! /awips2/qpid/bin/*
|
! /awips2/qpid/bin/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue