Wednesday, March 31, 2010

Exception in Quartz Jobs

It's been a while and this problem keeps coming back and ...back. When you develop your Quartz Job extending the Job interface - bare in mind and review your code - in the execute() method, make sure that whatever wrong happens during execution - you properly throw a JobExecutionException so that is properly caught and re-thrown in the system. I have been seeing cases where multiple types of exceptions  are not properly propagated back.We end up with failed jobs in the database but with limited trace on what really went wrong. Of course the use of  empty catch{} is to be avoided IMHO.

0 comments:

Post a Comment