void validateJBossHomeDirProperty() {
Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
String jbossHome = getRequiredPropertyValue(pluginConfig, JBOSS_HOME_DIR_CONFIG_PROP);
File jbossHomeDir = new File(jbossHome);
if (!jbossHomeDir.isAbsolute()) {
throw new InvalidPluginConfigurationException(
JBossASServerComponent.JBOSS_HOME_DIR_CONFIG_PROP
+ " connection property ('"
+ jbossHomeDir
+ "') is not an absolute path. Note, on Windows, absolute paths must start with the drive letter (e.g. C:).");
}
if (!jbossHomeDir.exists()) {
throw new InvalidPluginConfigurationException(JBossASServerComponent.JBOSS_HOME_DIR_CONFIG_PROP
+ " connection property ('" + jbossHomeDir + "') does not exist.");
}
if (!jbossHomeDir.isDirectory()) {
throw new InvalidPluginConfigurationException(JBossASServerComponent.JBOSS_HOME_DIR_CONFIG_PROP
+ " connection property ('" + jbossHomeDir + "') is a file, not a directory.");
}
}