[ https://issues.apache.org/jira/browse/UIMA-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655245#action_12655245 ]
Marshall Schor commented on UIMA-1201: -------------------------------------- After a bit of investigation, I found that # The shut-down code does a threadgroup {{destroy()}} call # This call cannot be done until all the threads in the threadgroup have been stopped There is no "safe" way to stop arbitrary threads, daemons or not. See http://java.sun.com/j2se/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html There may be some workarounds for your particular situation, though. The best would be to arrange for the daemon threads that you start for your database connection pool to be either * stopped by you when you detect the end of the run * associated (when started) with a different thread group that is not a subgroup of this one. I'm closing this as a "won't fix", but please feel free to re-open it if this analysis is incorrect. > UIMA Does Not Exit Due to threadGroupDestroyer Thread Waiting On Daemon > Threads > ------------------------------------------------------------------------------- > > Key: UIMA-1201 > URL: https://issues.apache.org/jira/browse/UIMA-1201 > Project: UIMA > Issue Type: Bug > Components: Collection Processing > Affects Versions: 2.2.2 > Reporter: Stephen Duncan Jr > Fix For: 2.3AS > > > The threadGroupDestroyer thread is causing my application to not exit when > finished processing. It's waiting on some threads from my database > connection pool. Those threads are daemon threads that won't end until the > JVM shuts down. The threadGroupDestroyer should not wait for daemon threads > to end before destroying the thread group. The relevant code is in lines > 2518-2542 of CPMEngine.java -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.