use of com.ramussoft.common.journal.JournalEngineImpl in project ramus by Vitaliy-Yakovchuk.
the class MemoryDatabase method createEngines.
protected void createEngines() {
try {
this.template = createTemplate();
List<PluginProvider> suits = new ArrayList<PluginProvider>();
loadSuits(suits);
PluginFactory factory = createPluginFactory(suits);
impl = createFileIEngine(factory);
accessor = impl.getAccessor();
PersistentFactory persistentFactory = new PersistentFactory("ramus_", factory.getAttributePlugins(), template);
persistentFactory.rebuild();
File file = getFile();
if (file != null)
impl.open(file, isIrnoreUnregisteredPlugins());
String jName = getJournalDirectoryName(impl.getTmpPath());
File directory = null;
if (jName != null) {
directory = new File(jName);
}
journalFactory = createJournalFactory(directory);
journaledEngine = createJournaledEngine(factory, persistentFactory);
this.engine = (Engine) SuperEngineFactory.createTransactionalEngine(engine, new JournalEngineImpl(journaledEngine));
this.engine.setPluginProperty("Core", "PluginList", factory.getPlugins());
this.engine.setPluginProperty("Core", "PluginFactory", factory);
} catch (Exception e) {
if (e instanceof RuntimeException)
throw (RuntimeException) e;
throw new RuntimeException(e);
}
}
Aggregations