svn commit: r654932 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

View: New views
3 Messages — Rating Filter:   Alert me  

svn commit: r654932 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

by markt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Author: markt
Date: Fri May  9 13:21:20 2008
New Revision: 654932

URL: http://svn.apache.org/viewvc?rev=654932&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42934
Trigger contextInitialized() before sessionDidActivate()
TCK tests all pass but I want to give this a little longer in trunk before proposing it for 6.0.x

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=654932&r1=654931&r2=654932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri May  9 13:21:20 2008
@@ -4269,14 +4269,6 @@
                 }
 
                 
-                // Start manager
-                if ((manager != null) && (manager instanceof Lifecycle)) {
-                    ((Lifecycle) getManager()).start();
-                }
-
-                // Start ContainerBackgroundProcessor thread
-                super.threadStart();
-
                 mainOk = true;
 
             }
@@ -4333,13 +4325,28 @@
                 lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null);
             }
             
-            // Configure and call application event listeners and filters
+            // Configure and call application event listeners
             if (ok) {
                 if (!listenerStart()) {
                     log.error( "Error listenerStart");
                     ok = false;
                 }
             }
+            
+            try {
+                // Start manager
+                if ((manager != null) && (manager instanceof Lifecycle)) {
+                    ((Lifecycle) getManager()).start();
+                }
+    
+                // Start ContainerBackgroundProcessor thread
+                super.threadStart();
+            } catch(Exception e) {
+                log.error("Error manager.start()", e);
+                ok = false;
+            }
+
+            // Configure and call application filters
             if (ok) {
                 if (!filterStart()) {
                     log.error( "Error filterStart");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: svn commit: r654932 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

by remm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 2008-05-09 at 20:21 +0000, markt@... wrote:
> Author: markt
> Date: Fri May  9 13:21:20 2008
> New Revision: 654932
>
> URL: http://svn.apache.org/viewvc?rev=654932&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42934
> Trigger contextInitialized() before sessionDidActivate()
> TCK tests all pass but I want to give this a little longer in trunk before proposing it for 6.0.x

I don't see what the patch does. Is it supposed to fix problems if an
exception occurs during starting the manager ? (which doesn't seem to be
the case looking at the comment)

Rémy



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: svn commit: r654932 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

by markt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Remy Maucherat wrote:

> On Fri, 2008-05-09 at 20:21 +0000, markt@... wrote:
>> Author: markt
>> Date: Fri May  9 13:21:20 2008
>> New Revision: 654932
>>
>> URL: http://svn.apache.org/viewvc?rev=654932&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42934
>> Trigger contextInitialized() before sessionDidActivate()
>> TCK tests all pass but I want to give this a little longer in trunk before proposing it for 6.0.x
>
> I don't see what the patch does. Is it supposed to fix problems if an
> exception occurs during starting the manager ? (which doesn't seem to be
> the case looking at the comment)

As per the bug description, it changes the order the listeners get fired in
on context start to something that seems more logical.

The spec is specific on shutdown order but silent w.r.t. start-up. This
makes start-up order the reverse of shutdown.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...