Author: fmeschbe
Date: Thu Oct 16 02:57:20 2008
New Revision: 705189

URL: http://svn.apache.org/viewvc?rev=705189&view=rev
Log:
SLING-698 Add logging in case of pinger thread termination

Modified:
    
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java

Modified: 
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java?rev=705189&r1=705188&r2=705189&view=diff
==============================================================================
--- 
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
 (original)
+++ 
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
 Thu Oct 16 02:57:20 2008
@@ -943,9 +943,18 @@
                 }
             }
 
+            // thread is terminating due to "running" being set to false
+            log(LogService.LOG_INFO, "Repository Pinger stopping on request");
+
+        } catch (Throwable t) {
+            // try to log the cause for thread termination
+            log(LogService.LOG_ERROR, "Repository Pinger caught unexpected 
issue", t);
+            
         } finally {
+            
             // whatever goes on, make sure the repository is disposed of
             // at the end of the thread....
+            log(LogService.LOG_INFO, "Stopping repository on shutdown");
             stopRepository();
         }
     }


Reply via email to