https://issues.apache.org/bugzilla/show_bug.cgi?id=47389
Summary: DeltaManager doesn't do the session replication.
(notifySessionListenersOnReplication=false)
Product: Tomcat 6
Version: 6.0.20
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Cluster
AssignedTo: [email protected]
ReportedBy: [email protected]
DeltaManager is used.
When notifySessionListenersOnReplication is set to false, session replication
is not done.
This cause is in the following DeltaManager#handleSESSION_CREATED's codes.
protected void handleSESSION_CREATED(SessionMessage msg,Member sender) {
...
if(notifySessionListenersOnReplication)
session.setId(msg.getSessionID());
else
session.setIdInternal(msg.getSessionID());
session.resetDeltaRequest();
session.endAccess();
}
When notifySessionListenersOnReplication is false, only session.setIdInternal
is executed.
Session is not added to session map of DeltaManager in session.setIdInternal
method.
As a result, session replication is not done.
When notifySessionListenersOnReplication is false,
I think that I should add session to session map of DeltaManager.
For instance, as follows.
[start.]
Index: java/org/apache/catalina/ha/session/DeltaManager.java
===================================================================
--- java/org/apache/catalina/ha/session/DeltaManager.java (revision 763870 (
https://svn.apache.org/viewcvs.cgi?view=rev&rev=763870 ))
+++ java/org/apache/catalina/ha/session/DeltaManager.java (working copy)
@@ -1435,10 +1435,12 @@
// use container maxInactiveInterval so that session will expire
correctly in case of primary transfer
session.setMaxInactiveInterval(getMaxInactiveInterval());
session.access();
- if(notifySessionListenersOnReplication)
+ if(notifySessionListenersOnReplication) {
session.setId(msg.getSessionID());
- else
+ } else {
session.setIdInternal(msg.getSessionID());
+ add(session);
+ }
session.resetDeltaRequest();
session.endAccess();
[end.]
Best regards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]