if (getConfiguration().getBoolean(LOGGING_PROPERTY, false)) {
final String level = getConfiguration().getString(LOGGING_PROPERTY + ".level", "debug");
objectStore = new IsisStoreLogger(objectStore, level);
}
final PersistenceSessionObjectStore persistenceSession =
createObjectStorePersistor(persistenceSessionFactory, adapterFactory, objectFactory, servicesInjector,
oidGenerator, adapterManager, persistAlgorithm, objectStore);
final IsisTransactionManager transactionManager = createTransactionManager(persistenceSession, objectStore);
ensureThatArg(persistenceSession, is(not(nullValue())));
ensureThatArg(transactionManager, is(not(nullValue())));
persistenceSession.setDirtiableSupport(true);
transactionManager.injectInto(persistenceSession);
// ... and finally return
return persistenceSession;
}