lockFile = null;
throw new IllegalStateException(
"Assertion failed. Internal locking error in "
+ getClass().getName() + '.');
}
final ExpandableProperties metaProperties = new ExpandableProperties();
try {
metaProperties.load(new FileInputStream(metaFile));
} catch (final IOException ioe) {
log.fatal("Failed to read meta props file '"
+ metaFile.getAbsolutePath() + "'", ioe);
throw new IllegalStateException("Failed to read meta props file '"
+ metaFile.getAbsolutePath() + "'", ioe);
}
final Properties expandProps = new Properties();
expandProps.setProperty("rtconfig.dir", rtConfigDir.getAbsolutePath());
expandProps.setProperty("app.contextpath", contextPath);
expandProps.setProperty("deployment.name", deploymentName);
try {
metaProperties.expand(expandProps); // Expand ${} properties
} catch (final Throwable t) {
log.fatal("Failed to expand properties in meta file '"
+ metaFile.getAbsolutePath() + "'", t);
throw new IllegalStateException(
"Failed to expand properties in meta file '"
+ metaFile.getAbsolutePath() + "'", t);
}
String requiredKeysString;
requiredKeysString = sc.getInitParameter("required.metaprop.keys");
if (requiredKeysString != null) {
final Set<String> requiredKeys = new HashSet<String>(
Arrays.asList(requiredKeysString.split("\\s*,\\s*", -1)));
requiredKeys.removeAll(metaProperties.keySet());
if (requiredKeys.size() > 0) {
log.fatal("Meta properties file '" + metaFile.getAbsolutePath()
+ "' missing required property(s): " + requiredKeys);
throw new IllegalStateException("Meta properties file '"
+ metaFile.getAbsolutePath()