-
1. Re: Stop deployment if application specific property is not set.
jaikiran Apr 2, 2013 10:30 PM (in response to klind)Well, the mere fact that your servlet was invoked is a sign that the deployment has completed. So there's nothing you can do to stop it. But anyway, what you are trying to do doesn't look right. Why do you want to stop the deployment from within a servlet?
-
2. Re: Stop deployment if application specific property is not set.
sfcoy Apr 2, 2013 11:44 PM (in response to klind)One possible solution could be to implement a javax.servlet.ServletContextListener and load your properties file there.
Additionally, you could perform whatever validation that you deem necessary and throw a java.lang.RuntimeException if it fails.
This will make the entire webapp unavailable.
-
3. Re: Stop deployment if application specific property is not set.
klind Apr 3, 2013 12:41 AM (in response to klind)I guess the best solution is to provide a very good log information about the error, and throw a RuntimeException.
At least the person who will do the deploy will see the app deployment failed and then look in the log.
-
4. Re: Stop deployment if application specific property is not set.
nickarls Apr 3, 2013 2:29 AM (in response to klind)Another option could be a subsystem/deployment processor (if the property file is included in the deployment archive). Could of course be overkill depending on the need.