diff --git a/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml b/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml index 435f916555..5cc16c3667 100644 --- a/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml +++ b/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml @@ -42,24 +42,6 @@ - - - - - - + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.base.feature/feature.xml b/edexOsgi/com.raytheon.uf.common.base.feature/feature.xml index eda6adfddc..784aa537bb 100644 --- a/edexOsgi/com.raytheon.uf.common.base.feature/feature.xml +++ b/edexOsgi/com.raytheon.uf.common.base.feature/feature.xml @@ -29,32 +29,6 @@ install-size="0" version="0.0.0"/> - - - - - - - - + + + + + + * @@ -73,6 +74,10 @@ public class DistributionSrv { private static final IUFStatusHandler statusHandler = UFStatus .getHandler(DistributionSrv.class); + private static final String HEADER_QPID_SUBJECT = "qpid.subject"; + + private static final String MESSAGE_HEADER = "header"; + private static class PatternWrapper { private final String plugin; @@ -223,7 +228,15 @@ public class DistributionSrv { StringBuilder pluginNames = new StringBuilder(); List dest = new ArrayList(); Message in = exchange.getIn(); - String header = (String) in.getHeader("header"); + // determine if the header is in the qpid subject field? + String header = (String) in.getHeader(HEADER_QPID_SUBJECT); + if (header != null) { + // make the qpid subject the header so that everything downstream + // will be able to read it as the header. + in.setHeader(MESSAGE_HEADER, header); + } + + header = (String) in.getHeader(MESSAGE_HEADER); Object payload = in.getBody(); String bodyString = null; if (payload instanceof byte[]) { @@ -277,8 +290,8 @@ public class DistributionSrv { throws DistributionException { RequestPatterns patternSet = null; try { - patternSet = SerializationUtil - .jaxbUnmarshalFromXmlFile(RequestPatterns.class, modelFile.getPath()); + patternSet = SerializationUtil.jaxbUnmarshalFromXmlFile( + RequestPatterns.class, modelFile.getPath()); } catch (Exception e) { throw new DistributionException("File " + modelFile.getAbsolutePath() diff --git a/nativeLib/edexBridge/edexBridge.cpp b/nativeLib/edexBridge/edexBridge.cpp index 0cb17d9179..27fb19a6e8 100644 --- a/nativeLib/edexBridge/edexBridge.cpp +++ b/nativeLib/edexBridge/edexBridge.cpp @@ -97,9 +97,9 @@ public: uint64_t current = (((long long) tv.tv_sec) * 1000000 + ((long long) tv.tv_usec)) / 1000; message.setDurable(true); + message.setSubject(fileHeader); message.setContent(fileLocation); - message.getProperties()["header"] = fileHeader; - message.getProperties()["enqueueTime"] = current; + message.setProperty("enqueueTime", current); this->sender.send(message); @@ -122,12 +122,44 @@ private: unotice ("Cleaning up"); // Destroy resources. - try { - session.close(); - connection.close(); - } catch (const std::exception& error) { - this->isConnected = false; - } + if (this->sender != 0) + { + try + { + this->sender.close(); + this->sender = 0; + } + catch (const std::exception& error) + { + uwarn(error.what()); + } + } + + if (this->session != 0) + { + try + { + this->session.close(); + this->session = 0; + } + catch (const std::exception& error) + { + uwarn(error.what()); + } + } + + if (this->connection != 0) + { + try + { + this->connection.close(); + this->connection = 0; + } + catch (const std::exception& error) + { + uwarn(error.what()); + } + } this->isConnected = false; } @@ -136,6 +168,10 @@ private: return this->isConnected; } try { + this->connection = 0; + this->session = 0; + this->sender = 0; + std::stringstream qpidURLBuilder; qpidURLBuilder << "amqp:tcp:"; qpidURLBuilder << this->brokerURI; diff --git a/rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0 b/rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0 index 1c140e92ae..d5602388dd 100644 --- a/rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0 +++ b/rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0 @@ -1,13 +1,8 @@ diff -crB a/component.spec b/component.spec -*** a/component.spec 2013-08-07 10:24:32.038932868 -0500 ---- b/component.spec 2013-08-07 10:24:18.422990138 -0500 +*** a/component.spec 2013-09-03 10:51:59.952913214 -0500 +--- b/component.spec 2013-09-03 11:10:40.703226553 -0500 *************** -*** 1,13 **** - # -! # AWIPS II Edex "component" spec file - # - %define __prelink_undo_cmd %{nil} - # Turn off the brp-python-bytecompile script +*** 6,13 **** %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g') @@ -16,12 +11,7 @@ diff -crB a/component.spec b/component.spec Version: %{_component_version} Release: %{_component_release} Group: AWIPSII ---- 1,13 ---- - # -! # AWIPS II Edex Data Delivery spec file - # - %define __prelink_undo_cmd %{nil} - # Turn off the brp-python-bytecompile script +--- 6,13 ---- %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g') @@ -65,7 +55,7 @@ diff -crB a/component.spec b/component.spec %postun %clean ---- 47,100 ---- +--- 47,104 ---- if [ $? -ne 0 ]; then exit 1 fi @@ -120,14 +110,16 @@ diff -crB a/component.spec b/component.spec + exit 1 + fi + fi ++ %postun %clean *************** *** 67,69 **** ---- 105,109 ---- +--- 109,113 ---- %dir /awips2 %dir /awips2/edex /awips2/edex/* + + %attr(744,root,root) /etc/init.d/* +\ No newline at end of file diff --git a/rpms/build/x86_64/build.sh b/rpms/build/x86_64/build.sh index 604e39de12..2df945f800 100644 --- a/rpms/build/x86_64/build.sh +++ b/rpms/build/x86_64/build.sh @@ -124,11 +124,18 @@ fi if [ "${1}" = "-rh6" ]; then buildRPM "awips2-common-base" + buildEDEX + if [ $? -ne 0 ]; then + exit 1 + fi + buildRPM "awips2-hydroapps-shared" + buildRPM "awips2-notification" buildJava buildRPM "awips2-python" buildRPM "awips2-python-cherrypy" buildRPM "awips2-python-nose" buildRPM "awips2-python-pil" + buildRPM "awips2-python-jimporter" buildRPM "awips2-python-qpid" buildRPM "awips2-python-thrift" buildRPM "awips2-python-werkzeug" @@ -185,12 +192,6 @@ if [ "${1}" = "-rh6" ]; then buildRPM "awips2-data.hdf5-topo" buildRPM "awips2" buildOpenfire - buildEDEX - if [ $? -ne 0 ]; then - exit 1 - fi - buildRPM "awips2-hydroapps-shared" - buildRPM "awips2-notification" exit 0 fi diff --git a/rpms/python.site-packages/Installer.jimporter/component.spec b/rpms/python.site-packages/Installer.jimporter/component.spec index e982abb9ab..a8e159eb9b 100644 --- a/rpms/python.site-packages/Installer.jimporter/component.spec +++ b/rpms/python.site-packages/Installer.jimporter/component.spec @@ -35,15 +35,21 @@ then fi rm -rf %{_build_root} -mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages %build %install +mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages +if [ $? -ne 0 ]; then + exit 1 +fi JIMPORTER_SRC_DIR="%{_python_pkgs_dir}/java-importer" cp -rv ${JIMPORTER_SRC_DIR}/* \ %{_build_root}/awips2/python/lib/python2.7/site-packages +if [ $? -ne 0 ]; then + exit 1 +fi %pre