// Initialise the PMF (even if unitMetaData is null)
pmf = initialisePMF(unitMetaData, overridingProps);
// Initialise the L2 cache (if used)
JDODataStoreCache cache = (JDODataStoreCache)pmf.getDataStoreCache();
OMFContext omfCtx = ((JDOPersistenceManagerFactory)pmf).getOMFContext();
if (cache != null)
{
datastoreCache = new JPADataStoreCache(omfCtx, cache.getLevel2Cache());
}
// Turn off loading of metadata from here if required
boolean allowMetadataLoad =
omfCtx.getPersistenceConfiguration().getBooleanProperty("datanucleus.metadata.allowLoadAtRuntime");