|
From: Brian R. (JIRA) <no...@at...> - 2006-03-21 16:00:58
|
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
|
|
From: Rogan D. (JIRA) <no...@at...> - 2006-06-06 10:23:48
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=comments#action_17870 ] Rogan Dawes commented on RCP-298: --------------------------------- I'm not particularly interested in this item, but it seems that it could be solved by means of an additional method in ApplicationLifeCycleAdvisor which is called by Application.close() rather than calling System.exit(). e.g. ApplicationLifeCycleAdvisor.exit(), with a default implementation of public void exit() { System.exit(0); } which would be easily overridable to implement whatever behaviour is desired. I guess the only question is whether the lifecycleadvisor created by the context would have been destroyed by the call to if( getApplicationContext() instanceof ConfigurableApplicationContext ) { ((ConfigurableApplicationContext) getApplicationContext()).close(); } > 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 |
|
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 |
|
From: Larry S. (JIRA) <no...@at...> - 2006-06-07 17:07:46
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=comments#action_17896 ] Larry Streepy commented on RCP-298: ----------------------------------- This is the Image Handler that gets registered when the framework initializes. I don't know if there is any way to unregister an image handler after the fact. > 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 |
|
From: Brian R. (JIRA) <no...@at...> - 2006-06-07 19:01:57
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=comments#action_17901 ] Brian Ross commented on RCP-298: -------------------------------- Is that a separate bug or should I leave it as part of this one? > 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 |
|
From: Larry S. (JIRA) <no...@at...> - 2006-06-07 20:07:51
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=comments#action_17909 ] Larry Streepy commented on RCP-298: ----------------------------------- I think that we can stick with this single issue, but the problem has expanded in scope. It now seems that you want to be able to start/stop spring rich "applications" from within a single JVM and have the platform remove all vestiges of itself in between application runs. Is that correct? > 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 |
|
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 |
|
From: Peter De B. (JIRA) <no...@at...> - 2007-11-29 07:14:17
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter De Bruycker updated RCP-298:
----------------------------------
Issue Type: New Feature (was: Bug)
> 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
> Issue Type: New Feature
> 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
|
|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-09 20:17:20
|
[ http://jira.springframework.org/browse/RCP-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo updated RCP-298:
-----------------------------
Fix Version/s: 1.x
> closing a spring rich application should not call system.exit
> -------------------------------------------------------------
>
> Key: RCP-298
> URL: http://jira.springframework.org/browse/RCP-298
> Project: Spring Framework Rich Client Project
> Issue Type: New Feature
> Components: Application Framework
> Reporter: Brian Ross
> Fix For: 1.x
>
>
> 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://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Lieven D. (JIRA) <no...@sp...> - 2009-07-09 22:25:02
|
[ http://jira.springsource.org/browse/RCP-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo closed RCP-298.
----------------------------
Resolution: Invalid
3 years old... closing
> closing a spring rich application should not call system.exit
> -------------------------------------------------------------
>
> Key: RCP-298
> URL: http://jira.springsource.org/browse/RCP-298
> Project: Spring Rich Client Project
> Issue Type: New Feature
> Components: Core
> Reporter: Brian Ross
> Fix For: 1.x
>
>
> 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://jira.springsource.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|