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 2010/05/01 16:26:51 UTC

svn commit: r940038 - in /tomcat/trunk/java/org/apache/catalina/startup: Catalina.java LocalStrings.properties

Author: markt
Date: Sat May  1 14:26:50 2010
New Revision: 940038

URL: http://svn.apache.org/viewvc?rev=940038&view=rev
Log:
Minor clean-up having reviewed the diff between current code and the code prior to the Lifecycle re-factoring

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
    tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=940038&r1=940037&r2=940038&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Sat May  1 14:26:50 2010
@@ -96,6 +96,12 @@ public class Catalina {
 
 
     /**
+     * The server component we are starting or stopping.
+     */
+    protected Server server = null;
+
+    
+    /**
      * Are we starting a new server?
      */
     protected boolean starting = false;
@@ -120,12 +126,6 @@ public class Catalina {
 
 
     /**
-     * The Server object for this Tomcat instance
-     */
-    protected Server server = null;
-
-    
-    /**
      * Is naming enabled ?
      */
     protected boolean useNaming = true;
@@ -780,11 +780,7 @@ public class Catalina {
         public void run() {
 
             if (getServer() != null) {
-                try {
-                    Catalina.this.stop();
-                } catch (Exception e) {
-                    log.error(sm.getString("catalina.shutdownHookFail"), e);
-                }
+                Catalina.this.stop();
             }
             
             // If JULI is used, shut JULI down *after* the server shuts down

Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=940038&r1=940037&r2=940038&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Sat May  1 14:26:50 2010
@@ -13,7 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-catalina.shutdownHookFail=The shutdown hook experienced an error while trying to stop the server
 catalina.stopServer=No shutdown port configured. Shut down server through OS signal. Server not shut down.
 contextConfig.altDDNotFound=alt-dd file {0} not found
 contextConfig.applicationUrl=Unable to determine URL for application web.xml



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


Re: svn commit: r940038 - in /tomcat/trunk/java/org/apache/catalina/startup: Catalina.java LocalStrings.properties

Posted by Mark Thomas <ma...@apache.org>.
On 01/05/2010 17:18, Konstantin Kolinko wrote:
> 2010/5/1 Mark Thomas <ma...@apache.org>:
>> On 01/05/2010 16:15, Konstantin Kolinko wrote:
>>> 2010/5/1  <ma...@apache.org>:
>>> Why are you removing the above try/catch?
>>
>> It was added to catch LifecycleException when I made Catalina implement
>> Lifecycle. When I removed that interface, I changed this to Exception
>> but I could have / should have just removed it. So I did.
>>
> 
> Ah, I see.
> 
> I reverted that, using some more robust code, and proposed for 6.0.x.

Like it.

Mark



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


Re: svn commit: r940038 - in /tomcat/trunk/java/org/apache/catalina/startup: Catalina.java LocalStrings.properties

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/5/1 Mark Thomas <ma...@apache.org>:
> On 01/05/2010 16:15, Konstantin Kolinko wrote:
>> 2010/5/1  <ma...@apache.org>:
>> Why are you removing the above try/catch?
>
> It was added to catch LifecycleException when I made Catalina implement
> Lifecycle. When I removed that interface, I changed this to Exception
> but I could have / should have just removed it. So I did.
>

Ah, I see.

I reverted that, using some more robust code, and proposed for 6.0.x.

Best regards,
Konstantin Kolinko

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


Re: svn commit: r940038 - in /tomcat/trunk/java/org/apache/catalina/startup: Catalina.java LocalStrings.properties

Posted by Mark Thomas <ma...@apache.org>.
On 01/05/2010 16:15, Konstantin Kolinko wrote:
> 2010/5/1  <ma...@apache.org>:
>> Author: markt
>> Date: Sat May  1 14:26:50 2010
>> New Revision: 940038
>>
>> URL: http://svn.apache.org/viewvc?rev=940038&view=rev
>> Log:
>> Minor clean-up having reviewed the diff between current code and the code prior to the Lifecycle re-factoring
>>
> 
>> @@ -780,11 +780,7 @@ public class Catalina {
>>         public void run() {
>>
>>             if (getServer() != null) {
>> -                try {
>> -                    Catalina.this.stop();
>> -                } catch (Exception e) {
>> -                    log.error(sm.getString("catalina.shutdownHookFail"), e);
>> -                }
>> +                Catalina.this.stop();
>>             }
>>
> 
> Why are you removing the above try/catch?

It was added to catch LifecycleException when I made Catalina implement
Lifecycle. When I removed that interface, I changed this to Exception
but I could have / should have just removed it. So I did.

Mark



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


Re: svn commit: r940038 - in /tomcat/trunk/java/org/apache/catalina/startup: Catalina.java LocalStrings.properties

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/5/1  <ma...@apache.org>:
> Author: markt
> Date: Sat May  1 14:26:50 2010
> New Revision: 940038
>
> URL: http://svn.apache.org/viewvc?rev=940038&view=rev
> Log:
> Minor clean-up having reviewed the diff between current code and the code prior to the Lifecycle re-factoring
>

> @@ -780,11 +780,7 @@ public class Catalina {
>         public void run() {
>
>             if (getServer() != null) {
> -                try {
> -                    Catalina.this.stop();
> -                } catch (Exception e) {
> -                    log.error(sm.getString("catalina.shutdownHookFail"), e);
> -                }
> +                Catalina.this.stop();
>             }
>

Why are you removing the above try/catch?

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