Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4485B10333 for ; Fri, 27 Sep 2013 07:49:10 +0000 (UTC) Received: (qmail 65284 invoked by uid 500); 27 Sep 2013 07:47:36 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 65063 invoked by uid 500); 27 Sep 2013 07:47:10 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 65040 invoked by uid 99); 27 Sep 2013 07:47:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 07:47:05 +0000 Date: Fri, 27 Sep 2013 07:47:04 +0000 (UTC) From: "Mike Noordermeer (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5087) ThreadLocal: BusFactory.threadBus is never removed, generates permgen out of memory error after some redeployments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13779746#comment-13779746 ] Mike Noordermeer commented on CXF-5087: --------------------------------------- I believe this bug is missing a fix version 2.7.6. It does seem fixed judging from the source tagged 2.7.6/2.7.7. > ThreadLocal: BusFactory.threadBus is never removed, generates permgen out of memory error after some redeployments > ------------------------------------------------------------------------------------------------------------------ > > Key: CXF-5087 > URL: https://issues.apache.org/jira/browse/CXF-5087 > Project: CXF > Issue Type: Bug > Components: Bus, Core > Affects Versions: 2.7.5 > Reporter: Rene Preissel > > The ThreadLocal BusFactory.threadBus is created in the constructor of the CXFBusImpl and removed in the shutdown()-method. > But in an application server environment (e.g. JBoss7) with thread pools the constructor and the shutdwon()-method are invoked from different threads and therefore this ThreadLocal is never removed. > Issue CXF-2164 and CXF-2985 do already discuss this topic and assume that this bug is fixed, but there is still this dangling ThreadLocal. I proved this in a JBoss7.1.1.Final environment. > I don't know the reason for having this ThreadLocal for the whole lifetime of the bus. From my point of view a ThreadLocal should only exist for the lifetime of one request. At the end of the request, when the thread is given back to the pool, the ThreadLocal must be cleared. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira