Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CBDFAD691 for ; Tue, 7 Aug 2012 23:21:11 +0000 (UTC) Received: (qmail 95146 invoked by uid 500); 7 Aug 2012 23:21:11 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 95091 invoked by uid 500); 7 Aug 2012 23:21:11 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 94817 invoked by uid 99); 7 Aug 2012 23:21:10 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 23:21:10 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 7952E142855 for ; Tue, 7 Aug 2012 23:21:10 +0000 (UTC) Date: Tue, 7 Aug 2012 23:21:10 +0000 (UTC) From: "Trejkaz (JIRA)" To: dev@activemq.apache.org Message-ID: <1553459742.1950.1344381670500.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (AMQ-3047) addShutdownHook not executed in a AccessController.doPrivileged throws SecurityException if a security manager is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430717#comment-13430717 ] Trejkaz commented on AMQ-3047: ------------------------------ What's the rationale behind closing this? Is there an alternative fix? > addShutdownHook not executed in a AccessController.doPrivileged throws SecurityException if a security manager is enabled > ------------------------------------------------------------------------------------------------------------------------- > > Key: AMQ-3047 > URL: https://issues.apache.org/jira/browse/AMQ-3047 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.4.1 > Reporter: Trejkaz > > The BrokerService has code to create a Thread for use as a shutdown hook. > Both creating a thread and registering it with a shutdown hook can throw SecurityException if the context is not secure. ActiveMQ does not execute either call inside a doPrivileged() block, so even though we specifically grant these permissions to ActiveMQ, the operation fails. > Adding the doPrivileged() block around Thread constructors and calls to addShutdownHook() would fix the issue. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira