I want to ensure some bean created resource to be clean up gracefully (e.g. unlock the locked files).
Can I do like this?
1. Specify destroy method in the bean config.
2. Ensure we call applicationContext.close() before the program exit.
If I can do like this, how should we handle if I got exception during the destroy method is executed?
Can I do like this?
1. Specify destroy method in the bean config.
2. Ensure we call applicationContext.close() before the program exit.
If I can do like this, how should we handle if I got exception during the destroy method is executed?
Comment