You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org> on 2014/09/22 00:39:33 UTC
[jira] [Assigned] (SYNAPSE-726) AbstractContext.setName() method
needs refactoring, coz MBean registrations also happens there.
[ https://issues.apache.org/jira/browse/SYNAPSE-726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiranya Jayathilaka reassigned SYNAPSE-726:
-------------------------------------------
Assignee: Hiranya Jayathilaka
> AbstractContext.setName() method needs refactoring, coz MBean registrations also happens there.
> -----------------------------------------------------------------------------------------------
>
> Key: SYNAPSE-726
> URL: https://issues.apache.org/jira/browse/SYNAPSE-726
> Project: Synapse
> Issue Type: Bug
> Affects Versions: NIGHTLY
> Reporter: Sameera Jayasoma
> Assignee: Hiranya Jayathilaka
> Fix For: 2.1
>
>
> public abstract class AbstractEndpoint{
> ......
> public void setName(String endpointName) {
> this.endpointName = endpointName;
> metricsMBean = new EndpointView(endpointName, this);
> MBeanRegistrar.getInstance().registerMBean(metricsMBean, "Endpoint", endpointName);
> }
> ............
> }
> IMHO, we need move this MBean registration code out of this method. setName() should only set the name. Now it is doing some unrelated actions. Due to bit of code, we faced a memory leak recently.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org