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

maomaode updated CXF-1218:
--------------------------

    Attachment: ws-policy.patch

> 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, ws-policy.patch
>
>
> 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.

Reply via email to