[ https://issues.apache.org/jira/browse/CXF-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173375#comment-13173375 ]
Dhawalpatel commented on CXF-3978: ---------------------------------- Hi Daniel, Can you please update on above comment? I am sure its not going to work as SpringBusFactory code is writted as below: public Bus createBus(String cfgFiles[], boolean includeDefaults) { try { return finishCreatingBus(createApplicationContext(cfgFiles, includeDefaults)); } catch (BeansException ex) { LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null); throw new RuntimeException(ex); } } and createApplicatioNContext method private BusApplicationContext createApplicationContext(String cfgFiles[], boolean includeDefaults) { try { return new BusApplicationContext(cfgFiles, includeDefaults, context); } catch (BeansException ex) { LogUtils.log(LOG, Level.WARNING, "INITIAL_APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null); ClassLoader contextLoader = Thread.currentThread().getContextClassLoader(); if (contextLoader != BusApplicationContext.class.getClassLoader()) { Thread.currentThread().setContextClassLoader( BusApplicationContext.class.getClassLoader()); try { return new BusApplicationContext(cfgFiles, includeDefaults, context); } finally { Thread.currentThread().setContextClassLoader(contextLoader); } } else { throw ex; } } } creates it without checking if already the BusApplicationContext object exists or not. Similar case with ManagedConnectionImpl code wherein it doesnt check for if bus already exists This is even the case in 2.1.7 code. I dont think it will resolve this issue. The Bus is created by below code: final Bus bus = (Bus)bac.getBean(Bus.DEFAULT_BUS_ID); in SpringBusFactory and I see No fixes around this area. Thus the issue is still there. Thanks > Multiple BusApplicationContext Objects created by CXF > ----------------------------------------------------- > > Key: CXF-3978 > URL: https://issues.apache.org/jira/browse/CXF-3978 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.1 > Environment: Production > Reporter: Dhawalpatel > Priority: Blocker > > Hi all, > Can anyone tell me if there was a known bug or issue wherein CXF creates a > new BusApplicationCOntext object for each outgoing Web Service call? I see > that while using JCA Connector architecture, SpringBusFactory object creates > a new BusApplicationContext object. Is it a bug? I am running CXF in > WebContainer thread pool of WAS and as the threads never gets killed due to > pool, the BusApplicationContext objects accumulates and results in high GC > memory. > Please help if this is a known bug in this version of CXF? We are in a > production down situation due to memory overhead created by > BusApplicationContext object size and number of these objects. there is > one-one correspondence between BusApplicatioContext to Thread in thread pool > which is causing memory to increase. > The version of cxf-bundle-fuse is 2-1-3-18 > THanks -- 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