Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
BZ-1203469: Fail to auto discover EAP based products when product slo…
Browse files Browse the repository at this point in the history
…t is unknown

If a JBoss EAP 6/AS 7 instance does not include a bin/product.conf file,
it is assumed to be an AS 7 instance. However, if it does include a
product.conf file but the slot value is unknown by the as-7 plug-in, an
attempt is made to determine its type from its home directory name. If
this does not work, discovery is aborted and the JBoss EAP 6 / AS 7
instance can not be imported into inventory.

This fix allows the product type to fallback to a generic AS instance in
the event its product slot is unknown and a the home directory name does
not include a product key in its name.

(cherry picked from commit 29b503b)
  • Loading branch information
loleary committed Apr 27, 2015
1 parent 5bcfe33 commit 0a9a4ee
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -190,7 +190,12 @@ protected DiscoveredResourceDetails buildResourceDetails(ResourceDiscoveryContex
serverPluginConfig.setHostname(managementHostPort.host);
serverPluginConfig.setPort(managementHostPort.port);
pluginConfig.setSimpleValue("realm", hostConfig.getManagementSecurityRealm());
JBossProductType productType = JBossProductType.determineJBossProductType(homeDir);
JBossProductType productType = JBossProductType.AS;
try {
JBossProductType.determineJBossProductType(homeDir);
} catch (Exception e) {
log.warn("Managed product type for [" + homeDir + "] could not be determined or is unsupported: " + e.getMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$
}
serverPluginConfig.setProductType(productType);
pluginConfig.setSimpleValue("hostXmlFileName", getHostXmlFileName(commandLine));

Expand Down

0 comments on commit 0a9a4ee

Please sign in to comment.