You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Bharath Ganesh (JIRA)" <ji...@apache.org> on 2007/11/19 08:01:43 UTC

[jira] Updated: (CXF-1218) Memory Leak in Policy Engine

     [ https://issues.apache.org/jira/browse/CXF-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bharath Ganesh updated CXF-1218:
--------------------------------

    Attachment: PolicyEngineImpl.java

Attached the modified source file, with the fix I suggested.

> Memory Leak in Policy Engine
> ----------------------------
>
>                 Key: CXF-1218
>                 URL: https://issues.apache.org/jira/browse/CXF-1218
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.0.3, 2.0.4
>            Reporter: Bharath Ganesh
>             Fix For: 2.0.4
>
>         Attachments: PolicyEngineImpl.java
>
>
> A memory leak is figured out when the CXF Policy Engine is enabled. 
> When an endpoint is deployed, the createEndpointPolicyInfo(EndpointInfo , boolean, Assertor) method of PolicyEngineImpl is invoked where-in a EndpointPolicy is created for the endpoint and put into the endpointInfo map (EndpointInfo Vs EndpointPolicy).
> During endpoint shutdown/stop, the endpoint policy is never removed from the map.
> Possible Fix:
> Make PolicyEngineImpl implement ServerLifeCycleListener. In the stopServer() callback remove the EndpointPolicy from the map of EndpointInfo Vs EndpointPolicy.
> public void stopServer(Server server)
> {
>         EndpointInfo ei = server.getEndpoint().getEndpointInfo();
>         endpointInfo.remove(ei);
> }
> Hope this is a feasible fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.