Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1218

Memory Leak in Policy Engine

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3, 2.0.4
    • 2.0.4
    • WS-* Components
    • None

    Description

      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.

      Attachments

        1. ws-policy.patch
          1 kB
          maomaode
        2. PolicyEngineImpl.java
          21 kB
          Bharath Ganesh

        Activity

          People

            maomaode maomaode
            bharathganesh Bharath Ganesh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: