You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Andreas Mack (JIRA)" <ji...@apache.org> on 2006/11/07 15:19:02 UTC
[jira] Created: (AMQ-1029) TransportConnector get duplicated when
used with JMX
TransportConnector get duplicated when used with JMX
----------------------------------------------------
Key: AMQ-1029
URL: https://issues.apache.org/activemq/browse/AMQ-1029
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 4.0.2
Environment: Linux, ActiveMQ broker in a custom servlet, running on Tomcat 5.5.
Reporter: Andreas Mack
Priority: Minor
Attachments: tc-jmx-patch
The BrokerService keeps the configured TransportConnectors in a list called transportConnectors. In startAllConnectors, the list is traversed and each connector is started through startTransportConnector(). This method checks if JMX is configured, and if so, it called connector.asManagedConnector() which returns a new instance of a TransportConnector. This instance is started.
But in the transportConnectors list of BrokerService, the old, unstarted object is still existent. Since a TransportConnector starts a TransportServiceDetector thread, the old, unstarted instance contains a TSD that is not active. But the started TSD isn't referenced anymore.
On shutdown, the old, unstarted TC and subsequently TSD are stopped. The "lost" instance can't be touched anymore.
My patch does this: During spin-up, startTransportConnector() returns the instance that is started. The started instances are collected in an arraylist, this list replaces transportConnectors after startup.
Thanks to jstrachan for being patient on irc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (AMQ-1029) TransportConnector get duplicated when
used with JMX
Posted by "Jonas Lim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1029?page=all ]
Jonas Lim resolved AMQ-1029.
----------------------------
Fix Version/s: 4.1.2
4.2.0
Resolution: Fixed
Thanks!
patch applied to :
trunk : 477570
4.1 branch: 477571
Btw, I just added a bit of code to clear the transportConnectors list before replacing it with the started instances :)
ie. .....
this.transportConnectors.clear();
setTransportConnectors(al);
....
> TransportConnector get duplicated when used with JMX
> ----------------------------------------------------
>
> Key: AMQ-1029
> URL: https://issues.apache.org/activemq/browse/AMQ-1029
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 4.0.2
> Environment: Linux, ActiveMQ broker in a custom servlet, running on Tomcat 5.5.
> Reporter: Andreas Mack
> Priority: Minor
> Fix For: 4.1.2, 4.2.0
>
> Attachments: tc-jmx-patch
>
>
> The BrokerService keeps the configured TransportConnectors in a list called transportConnectors. In startAllConnectors, the list is traversed and each connector is started through startTransportConnector(). This method checks if JMX is configured, and if so, it called connector.asManagedConnector() which returns a new instance of a TransportConnector. This instance is started.
> But in the transportConnectors list of BrokerService, the old, unstarted object is still existent. Since a TransportConnector starts a TransportServiceDetector thread, the old, unstarted instance contains a TSD that is not active. But the started TSD isn't referenced anymore.
> On shutdown, the old, unstarted TC and subsequently TSD are stopped. The "lost" instance can't be touched anymore.
> My patch does this: During spin-up, startTransportConnector() returns the instance that is started. The started instances are collected in an arraylist, this list replaces transportConnectors after startup.
> Thanks to jstrachan for being patient on irc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-1029) TransportConnector get duplicated when
used with JMX
Posted by "Jonas Lim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1029?page=comments#action_37512 ]
Jonas Lim commented on AMQ-1029:
--------------------------------
sorry about that, forgot to apply it on the 4.0 branch:
it's applied at 4.0 branch : r478063
> TransportConnector get duplicated when used with JMX
> ----------------------------------------------------
>
> Key: AMQ-1029
> URL: https://issues.apache.org/activemq/browse/AMQ-1029
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 4.0.2
> Environment: Linux, ActiveMQ broker in a custom servlet, running on Tomcat 5.5.
> Reporter: Andreas Mack
> Priority: Minor
> Fix For: 4.1.2, 4.2.0
>
> Attachments: tc-jmx-patch
>
>
> The BrokerService keeps the configured TransportConnectors in a list called transportConnectors. In startAllConnectors, the list is traversed and each connector is started through startTransportConnector(). This method checks if JMX is configured, and if so, it called connector.asManagedConnector() which returns a new instance of a TransportConnector. This instance is started.
> But in the transportConnectors list of BrokerService, the old, unstarted object is still existent. Since a TransportConnector starts a TransportServiceDetector thread, the old, unstarted instance contains a TSD that is not active. But the started TSD isn't referenced anymore.
> On shutdown, the old, unstarted TC and subsequently TSD are stopped. The "lost" instance can't be touched anymore.
> My patch does this: During spin-up, startTransportConnector() returns the instance that is started. The started instances are collected in an arraylist, this list replaces transportConnectors after startup.
> Thanks to jstrachan for being patient on irc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (AMQ-1029) TransportConnector get duplicated when
used with JMX
Posted by "Andreas Mack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1029?page=comments#action_37511 ]
Andreas Mack commented on AMQ-1029:
-----------------------------------
thanks. Will it also be applied to 4.0.2 (which I'm still using currently)?
> TransportConnector get duplicated when used with JMX
> ----------------------------------------------------
>
> Key: AMQ-1029
> URL: https://issues.apache.org/activemq/browse/AMQ-1029
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 4.0.2
> Environment: Linux, ActiveMQ broker in a custom servlet, running on Tomcat 5.5.
> Reporter: Andreas Mack
> Priority: Minor
> Fix For: 4.1.2, 4.2.0
>
> Attachments: tc-jmx-patch
>
>
> The BrokerService keeps the configured TransportConnectors in a list called transportConnectors. In startAllConnectors, the list is traversed and each connector is started through startTransportConnector(). This method checks if JMX is configured, and if so, it called connector.asManagedConnector() which returns a new instance of a TransportConnector. This instance is started.
> But in the transportConnectors list of BrokerService, the old, unstarted object is still existent. Since a TransportConnector starts a TransportServiceDetector thread, the old, unstarted instance contains a TSD that is not active. But the started TSD isn't referenced anymore.
> On shutdown, the old, unstarted TC and subsequently TSD are stopped. The "lost" instance can't be touched anymore.
> My patch does this: During spin-up, startTransportConnector() returns the instance that is started. The started instances are collected in an arraylist, this list replaces transportConnectors after startup.
> Thanks to jstrachan for being patient on irc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira