Friday, December 30, 2011

Continute to load webapp even if one spring bean initialization fails

Continue to load webapp even if one spring bean initialization fails
AFAIK, you can't do this.
I do multiple DNS lookups on start up. I do not want the webapp to fail if one of them fails.
In that case, you need to modify your bean(s) to handle the case where the DNS lookup fails, leaving the bean instance in a state where it is essentially inactive but harmless, or where it can retry the DNS lookup later on.
In short, you have to cope with this yourself.

http://stackoverflow.com/questions/6920672/continute-to-load-webapp-even-if-one-spring-bean-initialization-fails

No comments:

Post a Comment