提交 1f4dbf28 authored 作者: Thomas Mueller's avatar Thomas Mueller

Auto-Reconnect

上级 b4aedbcf
......@@ -394,7 +394,10 @@ public class Database implements DataHandler {
}
if (lock != null) {
stopServer();
lock.unlock();
if (lockMode != FileLock.LOCK_SERIALIZED) {
// allow testing shutdown
lock.unlock();
}
lock = null;
}
} catch (Exception e) {
......
......@@ -130,6 +130,15 @@ public class TraceObject {
this.id = id;
}
/**
* Update the trace.
*
* @param trace the trace object
*/
protected void setTrace(Trace trace) {
this.trace = trace;
}
/**
* INTERNAL
*/
......
......@@ -74,11 +74,14 @@ public class SortedProperties extends Properties {
public static synchronized SortedProperties loadProperties(String fileName) throws IOException {
SortedProperties prop = new SortedProperties();
if (FileUtils.exists(fileName)) {
InputStream in = FileUtils.openFileInputStream(fileName);
InputStream in = null;
try {
in = FileUtils.openFileInputStream(fileName);
prop.load(in);
} finally {
in.close();
if (in != null) {
in.close();
}
}
}
return prop;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论