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 2008/11/25 02:28:22 UTC

DO NOT REPLY [Bug 46284] New: Add flag to DeltaManager that blocks processing cluster messages until local applicaiton initialization is completed

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

           Summary: Add flag to DeltaManager that blocks processing cluster
                    messages until local applicaiton initialization is
                    completed
           Product: Tomcat 6
           Version: 6.0.18
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Cluster
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: jason.lunn@gmail.com


Created an attachment (id=22928)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22928)
A multi-file patch that includes changes that allow DeltaManager to block
processing of cluster messages until local application initialization is
complete

Suggested enhancement to DeltaManager that allows a configuration element to
control whether incoming cluster messages should be blocked until after local
applications are done initializing.

The idea is that there exist some web applications (I know of at least one
commercial app [that I happen to support during working hours]) that, when
deployed on a cluster with session replication, fails when the cluster is
implemented with Tomcat but works fine when using other application containers.

The inspiration for this enhancement is a comment from the vendor's engineering
support, who tell me that other application containers (WebSphere and WebLogic,
at least) initialize local applications before beginning to process session
replication messages from the cluster.

The attached patch gives the Tomcat user the option of continuing to begin
processing session replication messages from the cluster immediately (the
default), or block processing those messages until local applications have
completed initialization.


-- 
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 46284] Add flag to DeltaManager that blocks processing cluster messages until local applicaiton initialization is completed

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





--- Comment #1 from Filip Hanik <fh...@apache.org>  2008-12-08 08:13:30 PST ---
Here is some feedback:

1. The formatting gets somewhat messed up, there are tabs in the patch.

2.      public void messageDataReceived(ClusterMessage cmsg) {
+       // Block processing until local application initialization has
+       // completed, if a gate has been erected
+       if(gate != null) {
+               try {
+                       gate.await();
+                       gate = null;
+               }
+               catch(InterruptedException e) {
+                       log.error(e, e);
+               }
+       }
+

This will pose a problem since it blocks the messaging threads. Other
applications running would suffer since you are now holding on to threads that
are supposed to deliver replication messages in other parts of the system.

3. openContainerGates
Does this happen all at once after all the apps are finished. (Am I reading it
correct?).
a container gate should be opened immediately after a context has finished
initialization. regardless of what other applications/containers are doing.

4. the 'gate' variable would have to be volatile, since the thread that is
creating the gate is different from the thread that is reading it, and the non
null gate might not have yet become visible.


-- 
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 46284] Add flag to DeltaManager that blocks processing cluster messages until local applicaiton initialization is completed

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


Jason A. Lunn <ja...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22928|0                           |1
        is obsolete|                            |




--- Comment #2 from Jason A. Lunn <ja...@gmail.com>  2008-12-09 06:49:48 PST ---
Created an attachment (id=23005)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23005)
A multi-file patch that includes changes that allow DeltaManager to block
processing of cluster messages until local application initialization is
complete

Revised per Filip's feedback:

1. added volatile keyword to declaration of variable 'gate'
2. synchronized the null check and assignment of 'gate'
3. -- Nothing done here yet, the intention of the current design is to block
all incoming session replication messages from being processed until all local
applications have been initialized.
4. removed tabs


-- 
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 46284] Add flag to DeltaManager that blocks processing cluster messages until local applicaiton initialization is completed

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


andyb <an...@proquest.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andy.blower@proquest.co.uk




-- 
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