diff --git a/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-common.xml b/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-common.xml
index 127211cfdd..0268f13326 100644
--- a/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-common.xml
+++ b/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-common.xml
@@ -2,10 +2,6 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-
-
@@ -20,16 +16,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-request.xml b/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-request.xml
index c687682b49..0c2412b911 100644
--- a/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-request.xml
+++ b/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-request.xml
@@ -1,6 +1,6 @@
-
+
@@ -34,5 +34,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteActivationMonitor.java b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteActivationMonitor.java
index ba627220be..14429a16e1 100644
--- a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteActivationMonitor.java
+++ b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteActivationMonitor.java
@@ -30,7 +30,7 @@ import com.raytheon.uf.common.site.notify.SiteActivationNotification;
import com.raytheon.uf.common.site.notify.SiteActivationNotification.ACTIVATIONSTATUS;
/**
- * TODO Add Description
+ * Monitors site activation across all JVMs on all cluster members
*
*
*
@@ -38,7 +38,8 @@ import com.raytheon.uf.common.site.notify.SiteActivationNotification.ACTIVATIONS
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Aug 9, 2011 bphillip Initial creation
+ * Aug 09, 2011 bphillip Initial creation
+ * Sep 11, 2014 #3622 randerso Fixed logic so failures still remove pending requests
*
*
*
@@ -47,7 +48,6 @@ import com.raytheon.uf.common.site.notify.SiteActivationNotification.ACTIVATIONS
*/
public class SiteActivationMonitor {
-
private Map>> activationMap = new HashMap>>();
private Map>> deactivationMap = new HashMap>>();
@@ -97,8 +97,8 @@ public class SiteActivationMonitor {
public void resetFailure() {
status = ACTIVATIONSTATUS.SUCCESS;
}
-
- public ACTIVATIONSTATUS getStatus(){
+
+ public ACTIVATIONSTATUS getStatus() {
return status;
}
@@ -135,7 +135,7 @@ public class SiteActivationMonitor {
deactivationMap.get(plugin).get(modifiedSite)
.add(serverAndMode);
}
- } else if (notification.isSuccess()) {
+ } else {
if (notification.isActivation()) {
activationMap.get(plugin).get(modifiedSite)
.remove(serverAndMode);
@@ -143,9 +143,11 @@ public class SiteActivationMonitor {
deactivationMap.get(plugin).get(modifiedSite)
.remove(serverAndMode);
}
- } else if (notification.isFailure()) {
- status = ACTIVATIONSTATUS.FAILURE;
+ if (notification.isFailure()) {
+ status = ACTIVATIONSTATUS.FAILURE;
+ }
}
+
return notification;
}
}
diff --git a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/notify/SendSiteActivationNotifications.java b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/notify/SendSiteActivationNotifications.java
index 560ce5216e..d2adc01e24 100644
--- a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/notify/SendSiteActivationNotifications.java
+++ b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/notify/SendSiteActivationNotifications.java
@@ -24,6 +24,8 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
+import com.raytheon.uf.common.serialization.SerializationException;
+import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.site.notify.SiteActivationNotification;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@@ -31,7 +33,7 @@ import com.raytheon.uf.edex.core.EDEXUtil;
import com.raytheon.uf.edex.core.EdexException;
/**
- * TODO Add Description
+ * Send site activation notifications to the SiteActivationMonitor
*
*
*
@@ -39,8 +41,10 @@ import com.raytheon.uf.edex.core.EdexException;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * Aug 9, 2011 bphillip Initial creation
+ * Aug 09, 2011 bphillip Initial creation
* Feb 15, 2013 1638 mschenke Moved site activation notifier class into edex.site
+ * Sep 11, 2014 3622 randerso Changed to use jms topic instead of vm queue so monitor
+ * sees messages from all JVMs.
*
*
*
@@ -52,7 +56,7 @@ public class SendSiteActivationNotifications {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(SendSiteActivationNotifications.class);
- private static String SITE_ACTIVATION_ROUTE = "siteActivateNotify";
+ public static String SITE_ACTIVATION_URI = "jms-generic:topic:siteActivateNotification?timeToLive=60000";
public static void send(SiteActivationNotification notification)
throws EdexException {
@@ -70,8 +74,14 @@ public class SendSiteActivationNotifications {
for (SiteActivationNotification notify : notifications) {
notify.setRunMode(modeName);
notify.setServerName(host);
- EDEXUtil.getMessageProducer().sendAsync(
- SITE_ACTIVATION_ROUTE, notify);
+ try {
+ EDEXUtil.getMessageProducer().sendAsyncUri(
+ SITE_ACTIVATION_URI,
+ SerializationUtil.transformToThrift(notify));
+ } catch (SerializationException e) {
+ statusHandler.error(
+ "Error transforming notification to thrift", e);
+ }
}
} catch (EdexException e) {
statusHandler.error("Error sending gfe notification", e);