Revision: 15349
Author: [email protected]
Date: Wed Nov 17 08:12:10 2010
Log: Update Issue 1873
Removing in memory leftovers of the SipSession and SipApplicationSession we
want to passivate.
http://code.google.com/p/mobicents/source/detail?r=15349
Modified:
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipApplicationSession.java
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipSession.java
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheSipManager.java
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipApplicationSession.java
Tue Nov 16 09:38:47 2010
+++
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipApplicationSession.java
Wed Nov 17 08:12:10 2010
@@ -930,10 +930,12 @@
public void passivate() {
notifyWillPassivate(ClusteredSessionNotificationCause.PASSIVATION);
((FaultTolerantSasTimerTask)expirationTimerTask).passivate();
+ expirationTimerTask = null;
if(servletTimers != null) {
for (ServletTimer servletTimer :
servletTimers.values()) {
((TimerServiceTask) servletTimer).passivate();
}
+ servletTimers.clear();
}
}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipSession.java
Mon Nov 15 03:34:52 2010
+++
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipSession.java
Wed Nov 17 08:12:10 2010
@@ -66,6 +66,7 @@
import
org.jboss.web.tomcat.service.session.notification.ClusteredSessionNotificationCause;
import
org.jboss.web.tomcat.service.session.notification.ClusteredSipSessionNotificationPolicy;
import org.mobicents.ha.javax.sip.ClusteredSipStack;
+import org.mobicents.ha.javax.sip.HASipDialog;
import
org.mobicents.servlet.sip.core.session.MobicentsSipApplicationSession;
import org.mobicents.servlet.sip.core.session.SessionManagerUtil;
import org.mobicents.servlet.sip.core.session.SipApplicationSessionKey;
@@ -74,6 +75,7 @@
import org.mobicents.servlet.sip.core.session.SipSessionKey;
import org.mobicents.servlet.sip.message.B2buaHelperImpl;
import org.mobicents.servlet.sip.message.SipFactoryImpl;
+import org.mobicents.servlet.sip.message.TransactionApplicationData;
import org.mobicents.servlet.sip.proxy.ProxyImpl;
import org.mobicents.servlet.sip.startup.SipService;
import org.mobicents.servlet.sip.startup.StaticServiceHolder;
@@ -1599,8 +1601,25 @@
public String getHaId() {
return haId;
}
+
+ @Override
+ public void passivate() {
+
notifyWillPassivate(ClusteredSessionNotificationCause.PASSIVATION);
+ processDialogPassivation();
+ sipApplicationSession = null;
+ }
public void processDialogPassivation() {
-
((ClusteredSipStack)StaticServiceHolder.sipStandardService.getSipStack()).passivateDialog(sessionCreatingDialogId);
+
((ClusteredSipStack)StaticServiceHolder.sipStandardService.getSipStack()).passivateDialog((HASipDialog)sessionCreatingDialog);
+ if(sessionCreatingDialog != null) {
+ TransactionApplicationData applicationData =
((TransactionApplicationData)sessionCreatingDialog.getApplicationData());
+ if(applicationData != null) {
+ applicationData.cleanUp();
+
applicationData.getSipServletMessage().cleanUp();
+
applicationData.getSipServletMessage().setSipSession(null);
+ sessionCreatingDialog.setApplicationData(null);
+ }
+ }
+ sessionCreatingDialog = null;
}
}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheSipManager.java
Wed Nov 17 05:14:51 2010
+++
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheSipManager.java
Wed Nov 17 08:12:10 2010
@@ -2828,10 +2828,8 @@
if (logger.isDebugEnabled()) {
logger.debug("Passivating session with id:
" + key);
}
-
- session
-
.notifyWillPassivate(ClusteredSessionNotificationCause.PASSIVATION);
- session.processDialogPassivation();
+
+ session.passivate();
getDistributedCacheConvergedSipManager().evictSipSession(session.getSipApplicationSession().getKey().getId(),
SessionManagerUtil.getSipSessionHaKey(key));
sipSessionPassivated();
sipManagerDelegate.removeSipSession(key);