[ 
https://issues.apache.org/jira/browse/AXIS2-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679133#action_12679133
 ] 

Hiranya Jayathilaka commented on AXIS2-4212:
--------------------------------------------

Thanks for the tip Michele. I think testing whether the state of the hook is 
RUNNABLE before removing it from the runtime would do the trick. If the hook is 
in the RUNNABLE state, that means it has started execution and hence should not 
be removed from the runtime.

> ListenerManager Shutdown Hook Attempts to Unregister Itself
> -----------------------------------------------------------
>
>                 Key: AXIS2-4212
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4212
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5, nightly
>         Environment: Any
>            Reporter: Hiranya Jayathilaka
>             Fix For: 1.5, nightly
>
>         Attachments: axis-4212.patch, AXIS2-4212-update1.patch
>
>
> The ListenerManagerShutdownThread calls listenerManager.stop( ) and the stop( 
> ) method in turns attempts to unregister the shutdown hook causing an 
> IllegalStateException to be thrown.
> Exception in thread "Thread-2" java.lang.IllegalStateException: Shutdown in 
> progress
>       at java.lang.Shutdown.remove(Shutdown.java:104)
>       at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
>       at 
> org.apache.axis2.engine.ListenerManager.stop(ListenerManager.java:155)
>       at 
> org.apache.axis2.engine.ListenerManager$ListenerManagerShutdownThread.run(ListenerManager.java:258)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to