You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/07/06 12:05:18 UTC

DO NOT REPLY [Bug 47478] New: DeltaSession ignores notifyListenersOnReplication when BackupManager is used.

https://issues.apache.org/bugzilla/show_bug.cgi?id=47478

           Summary: DeltaSession ignores notifyListenersOnReplication when
                    BackupManager is used.
           Product: Tomcat 6
           Version: 6.0.20
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Cluster
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: fujino.keiichi@oss.ntt.co.jp


When BackupManager is used,
DeltaSession notifies session listener even if notifyListenersOnReplication is
set to false. 

The cause is in the following o.a.c.h.s.DeltaSession#applyDiff's codes. 

public void applyDiff(byte[] diff, int offset, int length) throws IOException,
ClassNotFoundException {
    try {
        ...
            getDeltaRequest().execute(this);
        } finally {
            Thread.currentThread().setContextClassLoader(contextLoader);
        }
    }finally {
        unlock();
    }
}

DeltaSession always notifies the session listener regardless of the value of
notifyListenersOnReplication. 
Do not notify the session listener when notifyListenersOnReplication is set to
false. 

I think that I should add notifyListenersOnReplication to the second parameter 
when o.a.c.h.s.DeltaRequest#execute is invoked. 
For instance, as follows.

[start.]

Index: java/org/apache/catalina/ha/session/DeltaSession.java
===================================================================
--- java/org/apache/catalina/ha/session/DeltaSession.java    (revision 763870 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=763870 ))
+++ java/org/apache/catalina/ha/session/DeltaSession.java    (working copy)
@@ -175,7 +175,7 @@
                     ClassLoader[] loaders = getClassLoaders();
                     if (loaders != null && loaders.length > 0)
                        
Thread.currentThread().setContextClassLoader(loaders[0]);
-                    getDeltaRequest().execute(this);
+                    getDeltaRequest().execute(this, ((ClusterManager)
getManager()).isNotifyListenersOnReplication());
                 } finally {
                    
Thread.currentThread().setContextClassLoader(contextLoader);
                 }

[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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47478] DeltaSession ignores notifyListenersOnReplication when BackupManager is used.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47478


Filip Hanik <fh...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Filip Hanik <fh...@apache.org>  2009-07-06 08:45:59 PST ---
Fixed in revision 791524 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=791524 ).
Suggested for inclusion in Tomcat 6.

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org