    public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) {
        PersistenceProductDerivation pd = new PersistenceProductDerivation();
        try {
            Object poolValue = Configurations.removeProperty(EMF_POOL, m);
            ConfigurationProvider cp = pd.load(pui, m);
            if (cp == null)
                return null;
            Exception transformerException = null;
            String ctOpts = (String) Configurations.getProperty(CLASS_TRANSFORMER_OPTIONS, pui.getProperties());
            try {
                pui.addTransformer(new ClassTransformerImpl(cp, ctOpts,
                    pui.getNewTempClassLoader(), newConfigurationImpl()));
            } catch (Exception e) {
                transformerException = e;
            }
            if (!Configurations.containsProperty(BrokerValue.KEY, cp.getProperties())) {
                cp.addProperty("openjpa." + BrokerValue.KEY, getDefaultBrokerAlias());
            }
            BrokerFactory factory = getBrokerFactory(cp, poolValue, pui.getClassLoader());
            if (transformerException != null) {
                Log log = factory.getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
                if (log.isTraceEnabled()) {
                    log.warn(_loc.get("transformer-registration-error-ex", pui), transformerException);
                } else {
                    log.warn(_loc.get("transformer-registration-error", pui));
                }
            }
            OpenJPAConfiguration conf = factory.getConfiguration();
            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
            loadValidator(_log, conf);
            Options o = Configurations.parseProperties(Configurations.getProperties("openjpa.MetaDataRepository"));
            if(o.getBooleanProperty("Preload")){
                conf.getAbstractBrokerFactoryInstance().preload();
            }
            return JPAFacadeHelper.toEntityManagerFactory(factory);
        } catch (Exception e) {
            throw PersistenceExceptions.toPersistenceException(e);
        }
    }

    public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) {
        PersistenceProductDerivation pd = new PersistenceProductDerivation();
        try {
            Object poolValue = Configurations.removeProperty(EMF_POOL, m);
            ConfigurationProvider cp = pd.load(pui, m);
            if (cp == null)
                return null;
            Exception transformerException = null;
            String ctOpts = (String) Configurations.getProperty(CLASS_TRANSFORMER_OPTIONS, pui.getProperties());
            try {
                pui.addTransformer(new ClassTransformerImpl(cp, ctOpts,
                    pui.getNewTempClassLoader(), newConfigurationImpl()));
            } catch (Exception e) {
                transformerException = e;
            }
            if (!Configurations.containsProperty(BrokerValue.KEY, cp.getProperties())) {
                cp.addProperty("openjpa." + BrokerValue.KEY, getDefaultBrokerAlias());
            }
            BrokerFactory factory = getBrokerFactory(cp, poolValue, pui.getClassLoader());
            if (transformerException != null) {
                Log log = factory.getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
                if (log.isTraceEnabled()) {
                    log.warn(_loc.get("transformer-registration-error-ex", pui), transformerException);
                } else {
                    log.warn(_loc.get("transformer-registration-error", pui));
                }
            }
            OpenJPAConfiguration conf = factory.getConfiguration();
            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
            loadValidator(_log, conf);
            Options o = Configurations.parseProperties(Configurations.getProperties("openjpa.MetaDataRepository"));
            if(o.getBooleanProperty("Preload")){
                conf.getMetaDataRepositoryInstance().preload();
            }
            return JPAFacadeHelper.toEntityManagerFactory(factory);
        } catch (Exception e) {
            throw PersistenceExceptions.toPersistenceException(e);
        }
    }
