UIMA AS should add a global UncaughtExceptionHandler 
-----------------------------------------------------

                 Key: UIMA-2358
                 URL: https://issues.apache.org/jira/browse/UIMA-2358
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik
            Priority: Minor
             Fix For: 2.4.0AS


Currently UIMA AS process doesnt handle uncaught exceptions. Specifically, it 
should catch OOM Error and exit the process. When the OOM happens now, the jvm 
dumps an error (stack trace) and the UIMA AS process just hangs. Since JDK 1.5, 
java supports per thread as well a system wide (for all threads) custom 
UncaughtExceptionHandler. The application implements this interface and injects 
the handler to a specific thread via:

Thread.currentThread().setUncaughtExceptionHandler(new MyExceptionHandler());

Alternatively, one can set a global error handler via:

Thread.setDefaultUncaughtExceptionHandler(new MyExceptionHandler());

The latter is the approach that I will implement. When OOM Error happens (and 
perhaps for all errors), the UIMA AS process should exit. For all other 
exceptions (not caught in a executing thread), the custom exception handler 
will simply log the exception at WARNING level.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to