View | Details | Raw Unified | Return to bug 56724
Collapse All | Expand All

(-)java/org/apache/catalina/core/ContainerBase.java (-6 / +20 lines)
Lines 1335-1348 Link Here
1335
1335
1336
        @Override
1336
        @Override
1337
        public void run() {
1337
        public void run() {
1338
            while (!threadDone) {
1338
            Throwable t = null;
1339
                try {
1339
            String unexpectedDeathMessage = sm.getString(
1340
                    Thread.sleep(backgroundProcessorDelay * 1000L);
1340
                    "containerBase.backgroundProcess.unexpectedThreadDeath",
1341
                } catch (InterruptedException e) {
1341
                    Thread.currentThread().getName());
1342
                    // Ignore
1342
            try {
1343
                while (!threadDone) {
1344
                    try {
1345
                        Thread.sleep(backgroundProcessorDelay * 1000L);
1346
                    } catch (InterruptedException e) {
1347
                        // Ignore
1348
                    }
1349
                    if (!threadDone) {
1350
                        processChildren(ContainerBase.this);
1351
                    }
1343
                }
1352
                }
1353
            } catch (RuntimeException|Error e) {
1354
                t = e;
1355
                throw e;
1356
            } finally {
1357
                thread = null;
1344
                if (!threadDone) {
1358
                if (!threadDone) {
1345
                    processChildren(ContainerBase.this);
1359
                    log.error(unexpectedDeathMessage, t);
1346
                }
1360
                }
1347
            }
1361
            }
1348
        }
1362
        }
(-)java/org/apache/catalina/core/LocalStrings.properties (+1 lines)
Lines 81-86 Link Here
81
containerBase.backgroundProcess.cluster=Exception processing cluster {0} background process
81
containerBase.backgroundProcess.cluster=Exception processing cluster {0} background process
82
containerBase.backgroundProcess.realm=Exception processing realm {0} background process
82
containerBase.backgroundProcess.realm=Exception processing realm {0} background process
83
containerBase.backgroundProcess.valve=Exception processing valve {0} background process
83
containerBase.backgroundProcess.valve=Exception processing valve {0} background process
84
containerBase.backgroundProcess.unexpectedThreadDeath=Unexpected death of background thread {0}
84
defaultInstanceManager.invalidInjection=Invalid method resource injection annotation
85
defaultInstanceManager.invalidInjection=Invalid method resource injection annotation
85
filterChain.filter=Filter execution threw an exception
86
filterChain.filter=Filter execution threw an exception
86
filterChain.servlet=Servlet execution threw an exception
87
filterChain.servlet=Servlet execution threw an exception
(-)webapps/docs/changelog.xml (+4 lines)
Lines 64-69 Link Here
64
        <code>MapperListener</code> during repeated starts of embedded Tomcat.
64
        <code>MapperListener</code> during repeated starts of embedded Tomcat.
65
        (kkolinko)
65
        (kkolinko)
66
      </fix>
66
      </fix>
67
      <add>
68
        <bug>56724</bug>: Write an error message to Tomcat logs if container
69
        background thread is aborted unexpectedly. (kkolinko)
70
      </add>
67
    </changelog>
71
    </changelog>
68
  </subsection>
72
  </subsection>
69
  <subsection name="Coyote">
73
  <subsection name="Coyote">

Return to bug 56724