You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2014/10/16 18:00:31 UTC
[2/6] git commit: Stop strayed JMX feed
Stop strayed JMX feed
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/160cc9fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/160cc9fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/160cc9fa
Branch: refs/heads/master
Commit: 160cc9fa81e3af1e09c1bba8bf8b03cd15f7dec0
Parents: aa5e9d5
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Thu Oct 16 13:26:40 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Thu Oct 16 13:26:57 2014 +0300
----------------------------------------------------------------------
.../brooklyn/entity/webapp/tomcat/TomcatServerImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/160cc9fa/software/webapp/src/main/java/brooklyn/entity/webapp/tomcat/TomcatServerImpl.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/main/java/brooklyn/entity/webapp/tomcat/TomcatServerImpl.java b/software/webapp/src/main/java/brooklyn/entity/webapp/tomcat/TomcatServerImpl.java
index a83f284..f136105 100644
--- a/software/webapp/src/main/java/brooklyn/entity/webapp/tomcat/TomcatServerImpl.java
+++ b/software/webapp/src/main/java/brooklyn/entity/webapp/tomcat/TomcatServerImpl.java
@@ -44,7 +44,8 @@ public class TomcatServerImpl extends JavaWebAppSoftwareProcessImpl implements T
super();
}
- private volatile JmxFeed jmxFeed;
+ private volatile JmxFeed jmxWebFeed;
+ private volatile JmxFeed jmxAppFeed;
@Override
public void connectSensors() {
@@ -54,7 +55,7 @@ public class TomcatServerImpl extends JavaWebAppSoftwareProcessImpl implements T
String requestProcessorMbeanName = "Catalina:type=GlobalRequestProcessor,name=\"http-*\"";
String connectorMbeanName = format("Catalina:type=Connector,port=%s", getAttribute(HTTP_PORT));
- jmxFeed = JmxFeed.builder()
+ jmxWebFeed = JmxFeed.builder()
.entity(this)
.period(3000, TimeUnit.MILLISECONDS)
.pollAttribute(new JmxAttributePollConfig<Integer>(ERROR_COUNT)
@@ -76,7 +77,7 @@ public class TomcatServerImpl extends JavaWebAppSoftwareProcessImpl implements T
.setOnFailureOrException(false))
.build();
- JavaAppUtils.connectMXBeanSensors(this);
+ jmxAppFeed = JavaAppUtils.connectMXBeanSensors(this);
} else {
// if not using JMX
LOG.warn("Tomcat running without JMX monitoring; limited visibility of service available");
@@ -88,7 +89,8 @@ public class TomcatServerImpl extends JavaWebAppSoftwareProcessImpl implements T
public void disconnectSensors() {
super.disconnectSensors();
if (getDriver() != null && getDriver().isJmxEnabled()) {
- if (jmxFeed != null) jmxFeed.stop();
+ if (jmxWebFeed != null) jmxWebFeed.stop();
+ if (jmxAppFeed != null) jmxAppFeed.stop();
} else {
disconnectServiceUpIsRunning();
}