public PersistenceAdapter createPersistenceAdapter(String journalType) throws Exception {
File directory = new File("target/journal");
if( vmPersistenceAdapter==null ) {
delete(directory);
vmPersistenceAdapter = new VMPersistenceAdapter();
}
JournalPersistenceAdapter adapter = new JournalPersistenceAdapter(directory, vmPersistenceAdapter, new DefaultWireFormat());
adapter.setJournalType(journalType);
return adapter;
}