modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
| 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 49d276b51a5a1a849a38fc1f75250096d141c813
Author: Jean-Frederic Clere <jfclere(a)redhat.com>
Date: Thu Nov 28 13:34:30 2013 +0100
[BZ 1017961] JMX Plugin can fail testing for registration
Submitted by Thomas Segismont (tsegismo(a)redhat.com)
diff --git
a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
index 7886939..9838c14 100644
---
a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
+++
b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
@@ -158,6 +158,16 @@ public class TomcatServerComponent<T extends
ResourceComponent<?>> implements JM
* @throws Exception if there are any issues at all connecting to the server
*/
private synchronized EmsConnection loadConnection() throws Exception {
+
+ if (this.connection != null &&
!this.connection.getConnectionProvider().isConnected()) {
+ try {
+ this.connection.close();
+ } catch (Exception ignore) {
+ } finally {
+ this.connection = null;
+ }
+ }
+
if (this.connection == null) {
try {
Configuration pluginConfig =
this.resourceContext.getPluginConfiguration();
Show replies by date