Revision: 15382
Author: [email protected]
Date: Thu Nov 18 09:02:00 2010
Log: Update Issue 1837
More fixes
http://code.google.com/p/mobicents/source/detail?r=15382
Modified:
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipManagerDelegate.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/ClusteredSipManagerDelegate.java
Wed Nov 17 10:33:31 2010
+++
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipManagerDelegate.java
Thu Nov 18 09:02:00 2010
@@ -59,14 +59,16 @@
@Override
protected MobicentsSipApplicationSession
getNewMobicentsSipApplicationSession(
SipApplicationSessionKey key, SipContext sipContext) {
- return getNewMobicentsSipApplicationSession(key, sipContext,
true);
+ return getNewMobicentsSipApplicationSession(key, sipContext,
false);
}
protected MobicentsSipApplicationSession
getNewMobicentsSipApplicationSession(
- SipApplicationSessionKey key, SipContext sipContext, boolean
scheduleTimer) {
- ClusteredSipApplicationSession<? extends
OutgoingDistributableSessionData> session = null;
-
- clusteredSipManager.checkSipApplicationSessionPassivation(key);
+ SipApplicationSessionKey key, SipContext sipContext,
boolean recreate) {
+ ClusteredSipApplicationSession<? extends
OutgoingDistributableSessionData> session = null;
+
+ if(!recreate) {
+
clusteredSipManager.checkSipApplicationSessionPassivation(key);
+ }
if
(replicationGranularity.equals(ReplicationGranularity.ATTRIBUTE)) {
session = new
AttributeBasedClusteredSipApplicationSession(key,sipContext, useJK);
@@ -77,7 +79,7 @@
}
clusteredSipManager.getDistributedCacheConvergedSipManager().sipApplicationSessionCreated(key.getId());
session.setNew(true);
- if(scheduleTimer) {
+ if(!recreate) {
scheduleExpirationTimer(session);
}
return session;
@@ -90,9 +92,17 @@
protected MobicentsSipSession getNewMobicentsSipSession(SipSessionKey
key,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession
mobicentsSipApplicationSession) {
+ return getNewMobicentsSipSession(key, sipFactoryImpl,
mobicentsSipApplicationSession, false);
+ }
+
+ protected MobicentsSipSession getNewMobicentsSipSession(SipSessionKey
key,
+ SipFactoryImpl sipFactoryImpl,
+ MobicentsSipApplicationSession mobicentsSipApplicationSession, boolean
recreate) {
ClusteredSipSession<? extends OutgoingDistributableSessionData> session
= null;
- clusteredSipManager.checkSipSessionPassivation(key);
+ if(!recreate) {
+ clusteredSipManager.checkSipSessionPassivation(key);
+ }
if
(replicationGranularity.equals(ReplicationGranularity.ATTRIBUTE)) {
session = new AttributeBasedClusteredSipSession(key, sipFactoryImpl,
mobicentsSipApplicationSession, useJK);
=======================================
---
/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
+++
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/ClusteredSipSession.java
Thu Nov 18 09:02:00 2010
@@ -1609,9 +1609,9 @@
sipApplicationSession = null;
}
- public void processDialogPassivation() {
-
((ClusteredSipStack)StaticServiceHolder.sipStandardService.getSipStack()).passivateDialog((HASipDialog)sessionCreatingDialog);
+ public void processDialogPassivation() {
if(sessionCreatingDialog != null) {
+
((ClusteredSipStack)StaticServiceHolder.sipStandardService.getSipStack()).passivateDialog((HASipDialog)sessionCreatingDialog);
TransactionApplicationData applicationData =
((TransactionApplicationData)sessionCreatingDialog.getApplicationData());
if(applicationData != null) {
applicationData.cleanUp();
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheSipManager.java
Wed Nov 17 10:33:31 2010
+++
/trunk/servers/sip-servlets/sip-servlets-jboss5/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheSipManager.java
Thu Nov 18 09:02:00 2010
@@ -2504,7 +2504,8 @@
// a replication message from another
server
mustAdd = true;
initialLoad = true;
- session = (ClusteredSipSession<? extends
OutgoingDistributableSessionData>) sipManagerDelegate.getSipSession(key,
true, sipFactory, sipApplicationSessionImpl);
+ session = (ClusteredSipSession<? extends
OutgoingDistributableSessionData>)
+
((ClusteredSipManagerDelegate)sipManagerDelegate).getNewMobicentsSipSession(key,
sipFactory, sipApplicationSessionImpl, true);
OwnedSessionUpdate osu =
unloadedSipSessions_.get(key);
passivated = (osu != null && osu.passivated);
}
@@ -2643,7 +2644,7 @@
initialLoad = true;
//since the session has to be recreated we don't recreate the sas
timer since it is fault tolerant and has been failed over as well
session =
(ClusteredSipApplicationSession)
-
((ClusteredSipManagerDelegate)sipManagerDelegate).getNewMobicentsSipApplicationSession(key,
((SipContext)getContainer()), false);
+
((ClusteredSipManagerDelegate)sipManagerDelegate).getNewMobicentsSipApplicationSession(key,
((SipContext)getContainer()), true);
OwnedSessionUpdate osu =
unloadedSipApplicationSessions_.get(key);
passivated = (osu != null &&
osu.passivated);
}