-
Dec 7th, 2009, 09:08 AM
#1
Is there any Spring exception that can be thrown to stop an app mid-way in its start
I want to programmatically shut down the application from starting, e.g., mid-way, if a certain condition is raised. I do not want code as System.exit(1) as it will terminate the entire JVM and more than 1 application running in the JVM will be shut down. My goal is to shut down only one application (among more than one) that is running in the same shared JVM. As such, System.exit(int) is not an option.
Is there any Spring exception that I can throw which will stop the application from starting? Throwing a Runtime exception (throw new RuntimeException())does not stop the application - application still gets started.
My goal is to stop the application from starting, if that condition is raised. Can I use any Spring specific API, or throw any specific Spring exception that will stop the application from starting?
I am using WebSphere 6.1 as application server.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules