From: <do...@hy...> - 2008-02-22 22:39:14
|
Author: dougm Date: 2008-02-22 14:39:03 -0800 (Fri, 22 Feb 2008) New Revision: 7827 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=7827 Modified: trunk/plugins/weblogic/src/org/hyperic/hq/plugin/weblogic/jmx/WeblogicRuntimeDiscoverer.java Log: [HHQ-1669] Add support for mapping ListenAddress to platform.fqdn Modified: trunk/plugins/weblogic/src/org/hyperic/hq/plugin/weblogic/jmx/WeblogicRuntimeDiscoverer.java =================================================================== --- trunk/plugins/weblogic/src/org/hyperic/hq/plugin/weblogic/jmx/WeblogicRuntimeDiscoverer.java 2008-02-22 21:19:09 UTC (rev 7826) +++ trunk/plugins/weblogic/src/org/hyperic/hq/plugin/weblogic/jmx/WeblogicRuntimeDiscoverer.java 2008-02-22 22:39:03 UTC (rev 7827) @@ -56,7 +56,7 @@ implements RuntimeDiscoverer, PrivilegedAction { private static final boolean useJAAS = WeblogicProductPlugin.useJAAS(); - + private static final String PROP_FQDN = "weblogic.discover.fqdn"; private static Log log = LogFactory.getLog("WeblogicRuntimeDiscoverer"); private int serverId; @@ -66,18 +66,18 @@ private boolean usePlatformName = false; private WeblogicDetector plugin; private String version; + private Properties props; public WeblogicRuntimeDiscoverer(WeblogicDetector plugin) { this.plugin = plugin; this.version = plugin.getTypeInfo().getVersion(); - Properties props = plugin.getManager().getProperties(); + props = plugin.getManager().getProperties(); //this property can be used to host foreign nodes on //another platform. if set to "same" will use the same fqdn //as the admin server. - this.targetFqdn = - props.getProperty("weblogic.discover.fqdn"); + this.targetFqdn = props.getProperty(PROP_FQDN); //XXX cant do this by default because it will ruin DB //make it optional for acotel @@ -285,6 +285,9 @@ AIPlatformValue aiplatform = new AIPlatformValue(); String serverFqdn = server.getFqdn(); + serverFqdn = //support mapping via agent.properties + this.props.getProperty(PROP_FQDN + "." + serverFqdn, + serverFqdn); String fqdn = serverFqdn; //let it be known if the platform does not exist in cam |