|
From: Brian R. (JIRA) <no...@at...> - 2006-06-07 20:31:51
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=comments#action_17911 ] Brian Ross commented on RCP-298: -------------------------------- Yes, that's correct. This is the functionality I want. It also seems to me to be generally good programming practice for a library or framework irrespective of my particular needs. Are there any other areas you can think of where closing the application context will still leave things around? > closing a spring rich application should not call system.exit > ------------------------------------------------------------- > > Key: RCP-298 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-298 > Project: Spring Framework Rich Client Project > Type: Bug > Components: Application Framework > Reporter: Brian Ross > > Application.close() ends with a call to System.exit(0). > This will kill the JVM, which in many cases is inappropriate. For example, the spring rich application may be launched from inside another application running in the JVM and this call will bring down the entire process. > Simply removing the call will prevent this from happening, but will introduce another problem. If you try to relaunch the spring rich application, you will get an error because the application context still exists. The solution is to replace the call to System.exit(0) with the line: > SOLE_INSTANCE = null; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |