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 07:59:44 UTC

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

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


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.


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

Posted by "maomaode (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543481 ] 

maomaode commented on CXF-1218:
-------------------------------

Thanks Bharath for the fix, later you can just provide the patch for us,

If you've the command line svn,  from the trunk dir, run the following command,

svn diff > ws-policy.patch

Thanks

> 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.


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

Posted by "maomaode (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

maomaode resolved CXF-1218.
---------------------------

    Resolution: Fixed
      Assignee: maomaode

> 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
>            Assignee: maomaode
>             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.


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

Posted by "maomaode (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Bharath Ganesh (JIRA)" <ji...@apache.org>.
     [ 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.