Revision: 65ed7b22b4a3
Author: Jean Deruelle <[email protected]>
Date: Tue Jul 10 08:10:46 2012
Log: Update Issue 116
Fixing Issue with Admin Console
http://code.google.com/p/sipservlets/source/detail?r=65ed7b22b4a3
Modified:
/management/eap-plugin-as-5/src/main/java/org/rhq/plugins/jbossas5/SipApplicationDispatcherComponent.java
/sip-servlets-core-api/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcher.java
=======================================
---
/management/eap-plugin-as-5/src/main/java/org/rhq/plugins/jbossas5/SipApplicationDispatcherComponent.java
Mon Jul 9 10:18:37 2012
+++
/management/eap-plugin-as-5/src/main/java/org/rhq/plugins/jbossas5/SipApplicationDispatcherComponent.java
Tue Jul 10 08:10:46 2012
@@ -54,13 +54,17 @@
Map<String, AtomicLong> responsesProcessedBySc = null;
try {
EmsAttribute requestAttribute =
getEmsBean().getAttribute(NB_REQUESTS_PROCESSED_BY_METHOD_ATTRIBUTE_NAME);
- requestsProcessedByMethod = requestsProcessedByMethod = (Map<String,
AtomicLong>) requestAttribute.refresh();
+ if(requestAttribute != null) {
+ requestsProcessedByMethod = (Map<String, AtomicLong>)
requestAttribute.refresh();
+ }
} catch (Throwable e) {
log.error("An unexpected exception occured while trying to access the
Sip Balancer requestsProcessedByMethod", e);
}
try {
EmsAttribute responseAttribute =
getEmsBean().getAttribute(NB_RESPONSES_PROCESSED_BY_SC_ATTRIBUTE_NAME);
- responsesProcessedBySc = (Map<String, AtomicLong>)
responseAttribute.refresh();
+ if(responseAttribute != null) {
+ responsesProcessedBySc = (Map<String, AtomicLong>)
responseAttribute.refresh();
+ }
} catch (Throwable e) {
log.error("An unexpected exception occured while trying to access the
Sip Balancer responsesProcessedByStatusCode", e);
}
=======================================
---
/sip-servlets-core-api/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcher.java
Thu Oct 6 12:04:00 2011
+++
/sip-servlets-core-api/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcher.java
Tue Jul 10 08:10:46 2012
@@ -27,8 +27,10 @@
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.atomic.AtomicLong;
import javax.servlet.sip.SipURI;
import javax.servlet.sip.ar.SipApplicationRouter;
@@ -195,7 +197,12 @@
String[] getExtensionsSupported();
String[] getRfcSupported();
-
+
+ public Map<String, AtomicLong> getRequestsProcessedByMethod();
+ public Map<String, AtomicLong> getResponsesProcessedByStatusCode();
+ long getRequestsProcessedByMethod(String method);
+ long getResponsesProcessedByStatusCode(String statusCode);
+
void setGatherStatistics(boolean gatherStatistics);
boolean isGatherStatistics();