Revision: 7905
Author: [email protected]
Date: Fri Oct 9 02:44:34 2009
Log: Adding logging for configuration operations
http://code.google.com/p/mobicents/source/detail?r=7905
Modified:
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
Fri Oct 9 02:36:39 2009
+++
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
Fri Oct 9 02:44:34 2009
@@ -1253,26 +1253,28 @@
*/
public void setCongestionControlCheckingInterval(
long congestionControlCheckingInterval) {
- this.congestionControlCheckingInterval =
congestionControlCheckingInterval;
- statusLock.lock();
- try {
- if(started) {
- if(congestionControlTimerFuture != null) {
-
congestionControlTimerFuture.cancel(false);
- }
- if(congestionControlCheckingInterval > 0) {
- congestionControlTimerFuture =
congestionControlThreadPool.scheduleWithFixedDelay(congestionControlTimerTask,
congestionControlCheckingInterval, congestionControlCheckingInterval,
TimeUnit.MILLISECONDS);
- if(logger.isInfoEnabled()) {
- logger.info("Congestion control background task modified to check
every " + congestionControlCheckingInterval + " milliseconds.");
- }
- } else {
- if(logger.isInfoEnabled()) {
- logger.info("No Congestion control background task started since
the checking interval is equals to " + congestionControlCheckingInterval
+ " milliseconds.");
- }
- }
- }
- } finally {
- statusLock.unlock();
+ if(congestionControlCheckingInterval !=
this.congestionControlCheckingInterval) {
+ this.congestionControlCheckingInterval =
congestionControlCheckingInterval;
+ statusLock.lock();
+ try {
+ if(started) {
+ if(congestionControlTimerFuture !=
null) {
+
congestionControlTimerFuture.cancel(false);
+ }
+ if(congestionControlCheckingInterval >
0) {
+ congestionControlTimerFuture =
congestionControlThreadPool.scheduleWithFixedDelay(congestionControlTimerTask,
congestionControlCheckingInterval, congestionControlCheckingInterval,
TimeUnit.MILLISECONDS);
+ if(logger.isInfoEnabled()) {
+ logger.info("Congestion control background task modified to check
every " + congestionControlCheckingInterval + " milliseconds.");
+ }
+ } else {
+ if(logger.isInfoEnabled()) {
+ logger.info("No Congestion control background task started since
the checking interval is equals to " + congestionControlCheckingInterval
+ " milliseconds.");
+ }
+ }
+ }
+ } finally {
+ statusLock.unlock();
+ }
}
}