ThreadGroup in the default workqueue gets prematurely destroyed ---------------------------------------------------------------
Key: CXF-2606 URL: https://issues.apache.org/jira/browse/CXF-2606 Project: CXF Issue Type: Improvement Components: Core Affects Versions: 2.2.2 Environment: IBM JDK6 Reporter: Hadrian Zbarcea An IllegalThreadStateException gets thrown as shown in the stack below when a new Thread is added to the default workqueue. This does not happen with the Sun JDK and it was not encountered with the IBM JDK5 either. The Exception gets thrown because the ThreadGroup is destroyed by the time we add the new thread because the core pool size (low watermark) is 0, the number of threads is 0 and is a daemon thread. {code} Throwable occurred: java.lang.IllegalThreadStateException at java.lang.ThreadGroup.checkNewThread(ThreadGroup.java:147) at java.lang.Thread.initialize(Thread.java:332) at java.lang.Thread.<init>(Thread.java:267) at java.lang.Thread.<init>(Thread.java:225) at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory.newThread(AutomaticWorkQueueImpl.java:162) at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672) at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652) at org.apache.cxf.workqueue.AutomaticWorkQueueImpl.execute(AutomaticWorkQueueImpl.java:249) at org.apache.cxf.interceptor.OneWayProcessorInterceptor.handleMessage(OneWayProcessorInterceptor.java:83) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:104) {code} A workaround is to set the lowWaterMark to something >=1 so that the ThreadGroup never gets destroyed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.