Log RuntimeException thrown from thread created by Spring via the @Async annotation
- by Eugen
I'm having some difficulty logging RuntimeException from a thread. My system is: Java 7 (b118), Spring 3.0.5. The threads are not created by hand, but via Spring's @Async annotation, which creates it's own executor behind the scenes, so I don't really have the option of overriding any methods of the thread, FutureTask or anything low level.
So my question is if Spring has any support or if there are any best practices for handling (logging) these type of exceptions?
Any suggestions are appreciated.
Thanks.