[ 
https://issues.apache.org/jira/browse/TUSCANY-3660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebastian Millies updated TUSCANY-3660:
---------------------------------------

    Component/s: Java SCA Core Runtime

> IllegalStateException on shutdown in TuscanyListenerManager
> -----------------------------------------------------------
>
>                 Key: TUSCANY-3660
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3660
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.6
>         Environment: JDK 1.6.0_18, Windows XP, Eclipse 3.6 Helios
>            Reporter: Sebastian Millies
>            Priority: Minor
>
> The  TuscanyListenerManager.stop() method will generate an 
> IllegalStateException, because
> ApplicationShutdownHooks.runHooks() will already have set the shutdown hooks 
> collection
> to null when removeShutdownHook() is called in the Tuscany shutdown thread.
> public synchronized void stop() throws AxisFault {
>       super.stop();
>       Runtime.getRuntime().removeShutdownHook(shutdownThread);  // <-- here
>     }
> Test case:
>   SCADomain scaDomain = SCADomain.newInstance();
>   System.out.println( "Domain " + scaDomain.getURI() + " started - Press 
> enter to remove." );
>   System.in.read();
>   SCADomain.removeInstance( scaDomain );
>   System.exit(0);

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