You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/01/27 20:39:04 UTC

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

Author: markt
Date: Tue Jan 27 19:39:03 2015
New Revision: 1655132

URL: http://svn.apache.org/r1655132
Log:
Start tends to make extensive use of resources. Trigger a clean-up once
it finishes.

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=1655132&r1=1655131&r2=1655132&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jan 27 19:39:03 2015
@@ -5216,6 +5216,9 @@ public class StandardContext extends Con
             broadcaster.sendNotification(notification);
         }
 
+        // Trigger clean-up of the resources
+        getResources().backgroundProcess();
+
         // Reinitializing if something went wrong
         if (!ok) {
             setState(LifecycleState.FAILED);



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


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

Posted by Mark Thomas <ma...@apache.org>.
On 28/01/2015 14:39, Christopher Schultz wrote:
> Mark,
> 
> On 1/27/15 2:39 PM, markt@apache.org wrote:
>> Author: markt
>> Date: Tue Jan 27 19:39:03 2015
>> New Revision: 1655132
>>
>> URL: http://svn.apache.org/r1655132
>> Log:
>> Start tends to make extensive use of resources. Trigger a clean-up once
>> it finishes.
>>
>> 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=1655132&r1=1655131&r2=1655132&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
>> +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jan 27 19:39:03 2015
>> @@ -5216,6 +5216,9 @@ public class StandardContext extends Con
>>              broadcaster.sendNotification(notification);
>>          }
>>  
>> +        // Trigger clean-up of the resources
>> +        getResources().backgroundProcess();
> 
> I think it would be better to have a "cleanupResources" method that gets
> called from backgroundProcess, and to call cleanupResources here instead.
> 
> Calling backgroundProcess here seems architecturally unsound.

Fair point. I'll get that fixed.

Mark


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


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

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

On 1/27/15 2:39 PM, markt@apache.org wrote:
> Author: markt
> Date: Tue Jan 27 19:39:03 2015
> New Revision: 1655132
> 
> URL: http://svn.apache.org/r1655132
> Log:
> Start tends to make extensive use of resources. Trigger a clean-up once
> it finishes.
> 
> 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=1655132&r1=1655131&r2=1655132&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jan 27 19:39:03 2015
> @@ -5216,6 +5216,9 @@ public class StandardContext extends Con
>              broadcaster.sendNotification(notification);
>          }
>  
> +        // Trigger clean-up of the resources
> +        getResources().backgroundProcess();

I think it would be better to have a "cleanupResources" method that gets
called from backgroundProcess, and to call cleanupResources here instead.

Calling backgroundProcess here seems architecturally unsound.

-chris