use of org.apache.geronimo.transaction.log.HOWLLog in project aries by apache.
the class TransactionControlImpl method getLog.
private HOWLLog getLog(BundleContext ctx) throws Exception {
Object recovery = config.getOrDefault("recovery.log.enabled", false);
if (recovery instanceof Boolean ? (Boolean) recovery : Boolean.valueOf(recovery.toString())) {
String logFileExt = "log";
String logFileName = "transaction";
String logFileDir;
Object o = config.get("recovery.log.dir");
if (o == null) {
logFileDir = ctx.getDataFile("recoveryLog").getAbsolutePath();
} else {
logFileDir = o.toString();
}
File f = new File(logFileDir);
if (f.exists() && !f.isDirectory()) {
throw new IllegalArgumentException("The recovery log directory " + logFileDir + " is not a directory.");
}
HOWLLog log = new HOWLLog("org.objectweb.howl.log.BlockLogBuffer", 4, true, true, 50, logFileDir, logFileExt, logFileName, -1, 0, 2, 4, -1, true, xidFactory, null);
return log;
}
// null means a non-recoverable log
return null;
}
Aggregations