@SuppressWarnings("static-access")
private String findConfigurationFile(ResourceComponent parentResourceComponent) {
try {
if (parentResourceComponent instanceof ApplicationServerComponent) {
ApplicationServerComponent parentComponent = (ApplicationServerComponent) parentResourceComponent;
return parentComponent.getResourceContext().getPluginConfiguration().getSimple("serverHomeDir")
.getStringValue()
+ JBOSS_AS5_CONFIGURATION_FILE_RELATIVE_PATH;
}
} catch (java.lang.NoClassDefFoundError e) {
//Do absolutely nothing, that means the class loader does not have this module loaded.
//Just continue with the next discovery attempt.
}
try {
if (parentResourceComponent instanceof JBossASServerComponent) {
JBossASServerComponent parentComponent = (JBossASServerComponent) parentResourceComponent;
return parentComponent.getPluginConfiguration()
.getSimple(parentComponent.CONFIGURATION_PATH_CONFIG_PROP).getStringValue()
+ JBOSS_AS4_CONFIGURATION_FILE_RELATIVE_PATH;
}
} catch (java.lang.NoClassDefFoundError e) {
//Do absolutely nothing, that means the class loader does not have this module loaded.