Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 42731 invoked from network); 24 Nov 2010 21:00:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Nov 2010 21:00:57 -0000 Received: (qmail 7798 invoked by uid 500); 24 Nov 2010 21:01:28 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 7739 invoked by uid 500); 24 Nov 2010 21:01:28 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 7732 invoked by uid 99); 24 Nov 2010 21:01:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 21:01:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 21:01:26 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1351D23888E7; Wed, 24 Nov 2010 20:59:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1038816 - in /db/derby/code/branches/10.7: ./ java/engine/org/apache/derby/iapi/util/InterruptStatus.java Date: Wed, 24 Nov 2010 20:59:54 -0000 To: derby-commits@db.apache.org From: dag@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101124205954.1351D23888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dag Date: Wed Nov 24 20:59:53 2010 New Revision: 1038816 URL: http://svn.apache.org/viewvc?rev=1038816&view=rev Log: DERBY-4911 restoreIntrFlagIfSeen may throw ShutdownException causing confusing console stack trace at server shutdown Patch derby-4911, which makes restoreIntrFlagIfSeen ignore ShutdownException when trying to find lcc. We sometimes saw a ShutdownException stack dump on the console when stopping the network server. restoreIntrFlagIfSeen does nothing useful when we are closing down anyway, so we can safely ignore the exception. Backported from trunk as svc merge -c 1038813 Modified: db/derby/code/branches/10.7/ (props changed) db/derby/code/branches/10.7/java/engine/org/apache/derby/iapi/util/InterruptStatus.java Propchange: db/derby/code/branches/10.7/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Nov 24 20:59:53 2010 @@ -1 +1 @@ -/db/derby/code/trunk:1035603,1036769 +/db/derby/code/trunk:1035603,1036769,1038813 Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/iapi/util/InterruptStatus.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/iapi/util/InterruptStatus.java?rev=1038816&r1=1038815&r2=1038816&view=diff ============================================================================== --- db/derby/code/branches/10.7/java/engine/org/apache/derby/iapi/util/InterruptStatus.java (original) +++ db/derby/code/branches/10.7/java/engine/org/apache/derby/iapi/util/InterruptStatus.java Wed Nov 24 20:59:53 2010 @@ -22,6 +22,7 @@ package org.apache.derby.iapi.util; import org.apache.derby.iapi.error.StandardException; +import org.apache.derby.iapi.error.ShutdownException; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.services.sanity.SanityManager; import org.apache.derby.iapi.services.context.ContextService; @@ -155,9 +156,15 @@ public class InterruptStatus { */ public static void restoreIntrFlagIfSeen() { - LanguageConnectionContext lcc = - (LanguageConnectionContext)ContextService.getContextOrNull( - LanguageConnectionContext.CONTEXT_ID); + LanguageConnectionContext lcc = null; + try { + lcc = + (LanguageConnectionContext)ContextService.getContextOrNull( + LanguageConnectionContext.CONTEXT_ID); + } catch (ShutdownException e) { + // Ignore. DERBY-4911 Restoring interrupt flag is moot anyway if we + // are closing down. + } if (lcc == null) { // no lcc available for this thread, use thread local flag