Log RuntimeException thrown from thread created by Spring via the @Async annotation

Posted by Eugen on Stack Overflow See other posts from Stack Overflow or by Eugen
Published on 2010-12-25T18:45:13Z Indexed on 2010/12/25 18:54 UTC
Read the original article Hit count: 244

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about multithreading