*
* @param start whether or not to start the RemoteCacheManager
* @throws HotRodClientException if such a file cannot be found in the classpath
*/
public RemoteCacheManager(boolean start) {
ConfigurationBuilder builder = new ConfigurationBuilder();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
builder.classLoader(cl);
InputStream stream = new FileLookup().lookupFile(HOTROD_CLIENT_PROPERTIES, cl);
if (stream == null) {
log.couldNotFindPropertiesFile(HOTROD_CLIENT_PROPERTIES);
} else {
try {
builder.withProperties(loadFromStream(stream));
} finally {
Util.close(stream);
}
}
this.configuration = builder.build();
if (start) start();
}