You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Trejkaz (JIRA)" <ji...@apache.org> on 2012/08/08 01:21:10 UTC

[jira] [Commented] (AMQ-3047) addShutdownHook not executed in a AccessController.doPrivileged throws SecurityException if a security manager is enabled

    [ 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