|
From: Brian R. (JIRA) <no...@at...> - 2006-06-07 16:59:54
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=comments#action_17895 ] Brian Ross commented on RCP-298: -------------------------------- Apparently, something more than simply setting SOLE_INSTANCE to null must be done. When I do this, things seem to work alright but if I then try to load an image using the outer application (the non Spring part which hasnt been closed), I see this in the log: No image with key '1' exists in source bundle. at org.springframework.richclient.image.DefaultImageSource.getImageResource(DefaultImageSource.java:108) at org.springframework.richclient.image.DefaultImageSource.getImage(DefaultImageSource.java:92) at org.springframework.richclient.image.Handler.openConnection(Handler.java:99) at java.net.URL.openConnection(Unknown Source) at sun.awt.image.URLImageSource.getConnection(Unknown Source) at sun.awt.image.URLImageSource.getDecoder(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source) Something is still hanging 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 |