You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Stuart Roe (JIRA)" <ji...@apache.org> on 2009/11/30 14:19:52 UTC

[jira] Commented: (SMXCOMP-24) Items not removed from BeanEndpoint requests Map in all cases of request completion

    [ https://issues.apache.org/activemq/browse/SMXCOMP-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56170#action_56170 ] 

Stuart Roe commented on SMXCOMP-24:
-----------------------------------

I have also encountered the issue with async replies (as described by Nathan. Changing the reply to sendSync fixes the leak. I think that there is another leak involving the classes: java.util.HashMap$Entry, org.apache.activemq.command.ConsumerId, org.apache.activemq.command.SessionId and org.apache.activemq.command.ConnectionId.


> Items not removed from BeanEndpoint requests Map in all cases of request completion 
> ------------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-24
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-24
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2.2
>            Reporter: Craig Cobb
>         Attachments: BeanEndpointPatch.txt
>
>
> Memory leak caused by Request objects not being removed from "requests" Map in all cases.  Requests not removed results in memory leak.
> Patch info:
> {code}
> ### Eclipse Workspace Patch 1.0
> #P servicemix-3.2
> Index: deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
> ===================================================================
> --- deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java	(revision 693290)
> +++ deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java	(working copy)
> @@ -236,13 +236,16 @@
>              } else {
>                  // Exchange is finished
>                  if (exchange.getStatus() == ExchangeStatus.DONE) {
> +                    requests.remove(corId);
>                      return;
>                  // Exchange has been aborted with an exception
>                  } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
> +                    requests.remove(corId);
>                      return;
>                  // Fault message
>                  } else if (exchange.getFault() != null) {
>                      // TODO: find a way to send it back to the bean before setting the DONE status
> +                    requests.remove(corId);
>                      done(exchange);
>                  } else {
>                      MethodInvocation invocation = getMethodInvocationStrategy().createInvocation(
> {code}

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