You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Danushka Menikkumbura (JIRA)" <ji...@apache.org> on 2011/06/28 03:32:17 UTC

[jira] [Created] (QPID-3325) Expose broker shutdown hook using an API call

Expose broker shutdown hook using an API call
---------------------------------------------

                 Key: QPID-3325
                 URL: https://issues.apache.org/jira/browse/QPID-3325
             Project: Qpid
          Issue Type: Improvement
            Reporter: Danushka Menikkumbura
            Assignee: Danushka Menikkumbura




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Keith Wall (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall resolved QPID-3325.
------------------------------

    Resolution: Fixed

Changes look fine to me.
                
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Keith Wall
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Keith Wall (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214095#comment-13214095 ] 

Keith Wall commented on QPID-3325:
----------------------------------

Hi Robbie,

Two minor comments:

1) I think we should set the ShutdownHook's thread's name.   We seen the occasional deadlocks during shutdown in the past, and having the thread name in the thread dump might help diagnose if we ever have a re-occurence. 

2) I'm wondering if the responsibility for creating/registering/deregistering the shutdown hook would better sit with Broker rather than ApplicationRegistry.   (Maybe this would go beyond the scope of this Jira. What do you think)?

cheers Keith
                
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Keith Wall
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Robbie Gemmell (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell reassigned QPID-3325:
------------------------------------

    Assignee: Keith Wall  (was: Robbie Gemmell)
    
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Keith Wall
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3325) Make it possible to access broker shutdown hook from outside

Posted by "Danushka Menikkumbura (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Danushka Menikkumbura reassigned QPID-3325:
-------------------------------------------

    Assignee: Robbie Gemmell  (was: Danushka Menikkumbura)

> Make it possible to access broker shutdown hook from outside
> ------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>         Attachments: QPID-3325.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Keith Wall (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall reassigned QPID-3325:
--------------------------------

    Assignee: Robbie Gemmell  (was: Keith Wall)
    
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3325) Make it possible to access broker shutdown hook from outside

Posted by "Danushka Menikkumbura (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Danushka Menikkumbura updated QPID-3325:
----------------------------------------

    Summary: Make it possible to access broker shutdown hook from outside  (was: Expose broker shutdown hook using an API call)

> Make it possible to access broker shutdown hook from outside
> ------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>            Reporter: Danushka Menikkumbura
>            Assignee: Danushka Menikkumbura
>         Attachments: QPID-3325.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3325) Make it possible to access broker shutdown hook from outside

Posted by "Robbie Gemmell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063839#comment-13063839 ] 

Robbie Gemmell commented on QPID-3325:
--------------------------------------

Hi Danushka,

The work Keith referenced (QPID-3026) has now been completed, in concert with other related work on broker startup (QPID-2815). Keith's suggestion from this this JIRA was not included, but I think its a good idea and should be. My main reservation with the attached patch would be that since none of our code uses the getter and its not obvious why it should be there then it would likely just get 'cleaned up' by someone at some point.

Could you let us know if the reasoning behind exposing the shutdown hook thread was as queried, and whether the suggested approach would do what you are looking for? (updated patch welcome too)

Thanks,
Robbie

> Make it possible to access broker shutdown hook from outside
> ------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>         Attachments: QPID-3325.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3325) Make it possible to access broker shutdown hook from outside

Posted by "Keith Wall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057706#comment-13057706 ] 

Keith Wall commented on QPID-3325:
----------------------------------

Hi Danushka

I've reviewed your patch.

First, I have a question.  For what purpose does calling code require access to the ShutdownServiceThread?  If it is so the calling code can can *unregister* the shutdown hook, then I think it would be better if ApplicationRegistry itself took on this responsibility.  I think ApplicationRegistry should register the shutdown hook on initialisation (initialise()), and remove the shutdown hook when the remove is called (currently remove/removeAll()).

I am currently working in ApplicationRegistry (QPID-3026) and could incorporate this improvement too.  Please let me know your thoughts.  

Kind regards Keith Wall.


 


> Make it possible to access broker shutdown hook from outside
> ------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>         Attachments: QPID-3325.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Robbie Gemmell (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-3325:
---------------------------------

    Status: Ready To Review  (was: In Progress)
    
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3325) Expose broker shutdown hook using an API call

Posted by "Danushka Menikkumbura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056243#comment-13056243 ] 

Danushka Menikkumbura commented on QPID-3325:
---------------------------------------------

Ability to access broker shutdown hook from outside the ApplicationRegistry is quite useful when broker runs in embedded mode.

> Expose broker shutdown hook using an API call
> ---------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>            Reporter: Danushka Menikkumbura
>            Assignee: Danushka Menikkumbura
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Robbie Gemmell (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell reassigned QPID-3325:
------------------------------------

    Assignee: Keith Wall  (was: Robbie Gemmell)

Keith, could you review this change please?

Thanks,
Robbie
                
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Keith Wall
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Robbie Gemmell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216610#comment-13216610 ] 

Robbie Gemmell commented on QPID-3325:
--------------------------------------

I had thought about putting it in Broker, so I guess you doing so too means that I should have. I didnt name the thread as I dont really think it really makes any real difference in this case, but that works both ways so I'm happy to do so. Changes made.
                
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3325) Make it possible to access broker shutdown hook from outside

Posted by "Danushka Menikkumbura (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Danushka Menikkumbura updated QPID-3325:
----------------------------------------

    Attachment: QPID-3325.patch

> Make it possible to access broker shutdown hook from outside
> ------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>            Reporter: Danushka Menikkumbura
>            Assignee: Danushka Menikkumbura
>         Attachments: QPID-3325.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3325) make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook

Posted by "Robbie Gemmell (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-3325:
---------------------------------

      Component/s: Java Broker
    Fix Version/s: 0.15
          Summary: make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook  (was: Make it possible to access broker shutdown hook from outside)

Given the lack of reply to the above questions I think its past time we just make the change we thought was most suitable and have the ApplicationRegistry remove its shutdown hook in the event it is closed by something other than the hook. This would allow an embeeded broker to be shut down without it leaving behind a shutdown hook that would later run when the JVM was shut down, which I believe is the only reasonable explanation behind the request to directly access the thread.

Changing title from 'Make it possible to access broker shutdown hook from outside' to 'make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook' to reflect the actual change being made.
                
> make the ApplicationRegistry unregister its shutdown hook when closed by means other than the shutdown hook
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3325
>                 URL: https://issues.apache.org/jira/browse/QPID-3325
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Danushka Menikkumbura
>            Assignee: Robbie Gemmell
>             Fix For: 0.15
>
>         Attachments: QPID-3325.patch
>
>


--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org