Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Having a rather complex application setup with Quartz jobs scheduled to invoke service
- Application is terminating but termination takes a while (around 30 secs)
- Quartz job triggers and checks if the service to be invoked is still available using ServiceManager.hasService(String). We are in the middle of a container disposal but hasService() happily returns true
- Quartz job invokes the service but during the disposal we get a lot of exceptions
A better approach (but not bullet-proof) is
- returning "false" from ServiceManager.hasService(String) when the container is currently disposing. That would give my Quartz job the possibility to skip the job execution
- service lookup still needs to work in my case
- make the time to start the container disposal configurable in the container configuration with a default value of "0"