This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 908795 - [RFE] The JMX plugin should be able to use JBoss Remotin…
…g 3 to connect to EAP6 using JSR-160 remoting Added new connection metadata (ConnectionTypeDescriptor classes) for: * AS7 and EAP6.0 * EAP6.1 and above * Wildfly 8 Added new connection templates for JMX server manual process Refactored JMX plugin itests Added itests for AS7 and Wildfly 8 in standalone mode -> Added the Maven plugins for AS7 and Wildfly 8 in order to start standalone servers -> add-user script is through an ANT tasks to support both UNIX-like systems and Windows systems
- Loading branch information
1 parent
672fa50
commit 73e9bb5
Showing
12 changed files
with
972 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<project name="add-user" default="main"> | ||
|
||
<target name="main"> | ||
|
||
<exec osfamily="unix" executable="bash" dir="${rhq.jmxplugin.as7.standalone.home}/bin"> | ||
<arg value="add-user.sh"/> | ||
<arg value="--silent=true"/> | ||
<arg value="rhqadmin"/> | ||
<arg value="rhqadmin_1"/> | ||
</exec> | ||
|
||
<exec osfamily="unix" executable="bash" dir="${rhq.jmxplugin.wildfly8.standalone.home}/bin"> | ||
<arg value="add-user.sh"/> | ||
<arg value="--silent=true"/> | ||
<arg value="rhqadmin"/> | ||
<arg value="rhqadmin_1"/> | ||
</exec> | ||
|
||
<exec osfamily="windows" executable="cmd" dir="${rhq.jmxplugin.as7.standalone.home}\bin"> | ||
<arg value="/C"/> | ||
<arg value="start"/> | ||
<arg value="add-user.bat"/> | ||
<arg value="--silent=true"/> | ||
<arg value="rhqadmin"/> | ||
<arg value="rhqadmin_1"/> | ||
</exec> | ||
|
||
<exec osfamily="windows" executable="cmd" dir="${rhq.jmxplugin.wildfly8.standalone.home}\bin"> | ||
<arg value="/C"/> | ||
<arg value="start"/> | ||
<arg value="add-user.bat"/> | ||
<arg value="--silent=true"/> | ||
<arg value="rhqadmin"/> | ||
<arg value="rhqadmin_1"/> | ||
</exec> | ||
|
||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...mx/src/main/java/org/rhq/plugins/jmx/connection/metadata/AS7ConnectionTypeDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* RHQ Management Platform | ||
* Copyright (C) 2005-2014 Red Hat, Inc. | ||
* All rights reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation version 2 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
*/ | ||
|
||
package org.rhq.plugins.jmx.connection.metadata; | ||
|
||
import java.util.Properties; | ||
|
||
import org.mc4j.ems.connection.ConnectionFactory; | ||
import org.mc4j.ems.connection.support.metadata.JSR160ConnectionTypeDescriptor; | ||
|
||
/** | ||
* @author Thomas Segismont | ||
*/ | ||
public class AS7ConnectionTypeDescriptor extends JSR160ConnectionTypeDescriptor { | ||
@Override | ||
public String getConnectionType() { | ||
return "AS7"; | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "JBoss AS7 and Red Hat JBoss EAP6 connection type"; | ||
} | ||
|
||
@Override | ||
public String getDefaultServerUrl() { | ||
return "service:jmx:remoting-jmx://localhost:9999"; | ||
} | ||
|
||
@Override | ||
public String[] getConnectionClasspathEntries() { | ||
return new String[] { "bin/client/jboss-client.jar" }; | ||
} | ||
|
||
@Override | ||
public boolean isUseChildFirstClassLoader() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public Properties getDefaultAdvancedProperties() { | ||
Properties properties = super.getDefaultAdvancedProperties(); | ||
properties.put(ConnectionFactory.USE_CONTEXT_CLASSLOADER, Boolean.FALSE.toString()); | ||
return properties; | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
.../src/main/java/org/rhq/plugins/jmx/connection/metadata/EAP61ConnectionTypeDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* RHQ Management Platform | ||
* Copyright (C) 2005-2014 Red Hat, Inc. | ||
* All rights reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation version 2 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
*/ | ||
|
||
package org.rhq.plugins.jmx.connection.metadata; | ||
|
||
import java.util.Properties; | ||
|
||
import org.mc4j.ems.connection.ConnectionFactory; | ||
import org.mc4j.ems.connection.support.metadata.JSR160ConnectionTypeDescriptor; | ||
|
||
/** | ||
* @author Thomas Segismont | ||
*/ | ||
public class EAP61ConnectionTypeDescriptor extends JSR160ConnectionTypeDescriptor { | ||
@Override | ||
public String getConnectionType() { | ||
return "EAP6.1+"; | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "Red Hat JBoss EAP6.1 and above connection type"; | ||
} | ||
|
||
@Override | ||
public String getDefaultServerUrl() { | ||
return "service:jmx:remoting-jmx://localhost:9999"; | ||
} | ||
|
||
@Override | ||
public String[] getConnectionClasspathEntries() { | ||
return new String[] { "bin/client/jboss-cli-client.jar" }; | ||
} | ||
|
||
@Override | ||
public boolean isUseChildFirstClassLoader() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public Properties getDefaultAdvancedProperties() { | ||
Properties properties = super.getDefaultAdvancedProperties(); | ||
properties.put(ConnectionFactory.USE_CONTEXT_CLASSLOADER, Boolean.FALSE.toString()); | ||
return properties; | ||
} | ||
} |
Oops, something went wrong.