~ubuntu-branches/ubuntu/oneiric/tomcat6/oneiric

« back to all changes in this revision

Viewing changes to java/org/apache/catalina/startup/Catalina.java

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-07-20 14:36:48 UTC
  • mfrom: (2.2.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100720143648-23y81x6cq1kv1z00
Tags: 6.0.28-2
* Add debconf questions for user, group and Java options.
* Use ucf to install /etc/default/tomcat6 from a template
* Drop CATALINA_BASE and CATALINA_HOME from /etc/default/tomcat6 since we
  shouldn't encourage users to change those anyway

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 *
61
61
 * @author Craig R. McClanahan
62
62
 * @author Remy Maucherat
63
 
 * @version $Revision: 919742 $ $Date: 2010-03-06 12:15:07 +0100 (Sa, 06. Mär 2010) $
 
63
 * @version $Id: Catalina.java 946849 2010-05-21 01:38:20Z kkolinko $
64
64
 */
65
65
 
66
66
public class Catalina extends Embedded {
687
687
    protected class CatalinaShutdownHook extends Thread {
688
688
 
689
689
        public void run() {
690
 
 
691
 
            if (getServer() != null) {
692
 
                Catalina.this.stop();
693
 
            }
694
 
            
695
 
            // If JULI is used, shut JULI down *after* the server shuts down
696
 
            // so log messages aren't lost
697
 
            LogManager logManager = LogManager.getLogManager();
698
 
            if (logManager instanceof ClassLoaderLogManager) {
699
 
                ((ClassLoaderLogManager) logManager).shutdown();
 
690
            try {
 
691
                if (getServer() != null) {
 
692
                    Catalina.this.stop();
 
693
                }
 
694
            } catch (Throwable ex) {
 
695
                log.error(sm.getString("catalina.shutdownHookFail"), ex);
 
696
            } finally {
 
697
                // If JULI is used, shut JULI down *after* the server shuts down
 
698
                // so log messages aren't lost
 
699
                LogManager logManager = LogManager.getLogManager();
 
700
                if (logManager instanceof ClassLoaderLogManager) {
 
701
                    ((ClassLoaderLogManager) logManager).shutdown();
 
702
                }
700
703
            }
701
704
 
702
705
        }