Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.3, 2.0.4
-
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.