JDBCPersistenceAdapter jdbcAdapter = new JDBCPersistenceAdapter();
jdbcAdapter.setDataSource(ds);
// Setup the Journal
File journalDir = new File(dataDirectory, "journal");
JournalPersistenceAdapter journalAdapter = new JournalPersistenceAdapter(journalDir, jdbcAdapter);
journalAdapter.setJournalType(JournalPersistenceAdapter.DEFAULT_JOURNAL_TYPE);
// Add a cache layer if the memory manager is available.
if( memManager==null )
return journalAdapter;