You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dhawalpatel (Commented) (JIRA)" <ji...@apache.org> on 2011/12/18 12:18:30 UTC

[jira] [Commented] (CXF-3978) Multiple BusApplicationContext Objects created by CXF

    [ https://issues.apache.org/jira/browse/CXF-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171826#comment-13171826 ] 

Dhawalpatel commented on CXF-3978:
----------------------------------

The stack trace looks like below for each thread calling the Outgoing Web Service call:

   at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:97)
        at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:136)
        at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:131)
        at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:121)
        at org.apache.cxf.jca.outbound.ManagedConnectionImpl.getBus(ManagedConnectionImpl.java:314)
        - locked <cf38d300> (a org.apache.cxf.jca.outbound.ManagedConnectionImpl)
        at org.apache.cxf.jca.outbound.ManagedConnectionImpl.createClientProxy(ManagedConnectionImpl.java:265)
        - locked <cf38d300> (a org.apache.cxf.jca.outbound.ManagedConnectionImpl)
        at org.apache.cxf.jca.outbound.ManagedConnectionImpl.createConnectionHandle(ManagedConnectionImpl.java:249)
        at org.apache.cxf.jca.outbound.ManagedConnectionImpl.getConnection(ManagedConnectionImpl.java:149)
        at com.ibm.ejs.j2c.MCWrapper.getConnection(MCWrapper.java:2020)
        at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:625)
        at org.apache.cxf.jca.outbound.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:53)
        

This definitely is creating a new CXFBusImpl object and new BusApplicationContext object for each outgoing call. This leads to about 700Mb accumulation of memory since as the Threads in ThreadpoOl grows, the number of these objects will also grow. In Scenario of ThreadPool size of 55 for WAS Webcontainer, the total size of BusApplicationContext exceeds 700M and causes JVMs to crash due to high GC and OOM errors.
Please check the code on priority as to what can be done to NOT instantiate a new BusapplicationContext by SpringBusFactory?
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: Critical
>
> 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