_conf.setReadOnly(Configuration.INIT_STATE_FREEZING); _conf.instantiateAll(); if (_conf.isInitializeEagerly()) { _conf.setReadOnly(Configuration.INIT_STATE_FROZEN);
_conf.setReadOnly(Configuration.INIT_STATE_FREEZING); _conf.instantiateAll(); if (_conf.isInitializeEagerly()) { _conf.setReadOnly(Configuration.INIT_STATE_FROZEN);
private ClassTransformerImpl(ConfigurationProvider cp, String props, final ClassLoader tmpLoader, OpenJPAConfiguration conf) { cp.setInto(conf); // use the temporary loader for everything conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class<?> context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(Configuration.INIT_STATE_FREEZING); MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setResolve(MetaDataModes.MODE_MAPPING, false); _trans = new PCClassFileTransformer(repos, Configurations.parseProperties(props), tmpLoader); }
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) { assertOpen(); makeReadOnly(); DelegatingStoreManager dsm = createDelegatingStoreManager(); ((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization); // if we're using remote events, register the event manager so // that it can broadcast commit notifications from the broker RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager(); if (remote.areRemoteEventsEnabled()) broker.addTransactionListener(remote); loadPersistentTypes(broker.getClassLoader()); _brokers.add(broker); _conf.setReadOnly(Configuration.INIT_STATE_FROZEN); }
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) { assertOpen(); makeReadOnly(); DelegatingStoreManager dsm = createDelegatingStoreManager(); ((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization); // if we're using remote events, register the event manager so // that it can broadcast commit notifications from the broker RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager(); if (remote.areRemoteEventsEnabled()) broker.addTransactionListener(remote); loadPersistentTypes(broker.getClassLoader()); _brokers.add(broker); _conf.setReadOnly(Configuration.INIT_STATE_FROZEN); }
private ClassTransformerImpl(ConfigurationProvider cp, String props, final ClassLoader tmpLoader, OpenJPAConfiguration conf) { cp.setInto(conf); // use the tmp loader for everything conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(Configuration.INIT_STATE_FREEZING); MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setResolve(MetaDataModes.MODE_MAPPING, false); _trans = new PCClassFileTransformer(repos, Configurations.parseProperties(props), tmpLoader); }
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) { assertOpen(); makeReadOnly(); DelegatingStoreManager dsm = createDelegatingStoreManager(); ((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization); // if we're using remote events, register the event manager so // that it can broadcast commit notifications from the broker RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager(); if (remote.areRemoteEventsEnabled()) broker.addTransactionListener(remote); loadPersistentTypes(broker.getClassLoader()); _brokers.add(broker); _conf.setReadOnly(Configuration.INIT_STATE_FROZEN); }
_conf.setReadOnly(Configuration.INIT_STATE_FREEZING); _conf.instantiateAll();
private ClassTransformerImpl(ConfigurationProvider cp, String props, final ClassLoader tmpLoader, OpenJPAConfiguration conf) { cp.setInto(conf); // use the temporary loader for everything conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class<?> context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(Configuration.INIT_STATE_FREEZING); MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setResolve(MetaDataModes.MODE_MAPPING, false); _trans = new PCClassFileTransformer(repos, Configurations.parseProperties(props), tmpLoader); }
private ClassTransformerImpl(ConfigurationProvider cp, String props, final ClassLoader tmpLoader, OpenJPAConfiguration conf) { cp.setInto(conf); // use the temporary loader for everything conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class<?> context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(Configuration.INIT_STATE_FREEZING); MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setResolve(MetaDataModes.MODE_MAPPING, false); _trans = new PCClassFileTransformer(repos, Configurations.parseProperties(props), tmpLoader); }
private ClassTransformerImpl(ConfigurationProvider cp, String props, final ClassLoader tmpLoader, OpenJPAConfiguration conf) { cp.setInto(conf); // use the temporary loader for everything conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class<?> context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(Configuration.INIT_STATE_FREEZING); MetaDataRepository repos = conf.getMetaDataRepositoryInstance(); repos.setResolve(MetaDataModes.MODE_MAPPING, false); _trans = new PCClassFileTransformer(repos, Configurations.parseProperties(props), tmpLoader); }
void initializeBroker(boolean managed, int connRetainMode, Broker broker, boolean fromDeserialization) { assertOpen(); makeReadOnly(); DelegatingStoreManager dsm = createDelegatingStoreManager(); ((BrokerImpl) broker).initialize(this, dsm, managed, connRetainMode, fromDeserialization); // if we're using remote events, register the event manager so // that it can broadcast commit notifications from the broker RemoteCommitEventManager remote = _conf.getRemoteCommitEventManager(); if (remote.areRemoteEventsEnabled()) broker.addTransactionListener(remote); loadPersistentTypes(broker.getClassLoader()); _brokers.add(broker); _conf.setReadOnly(Configuration.INIT_STATE_FROZEN); }
private static void registerClassLoadEnhancer(Instrumentation inst, Options opts) { OpenJPAConfiguration conf = new OpenJPAConfigurationImpl(); Configurations.populateConfiguration(conf, opts); // don't allow connections conf.setConnectionUserName(null); conf.setConnectionPassword(null); conf.setConnectionURL(null); conf.setConnectionDriverName(null); conf.setConnectionFactoryName(null); // set single class resolver final ClassLoader tmpLoader = (ClassLoader) AccessController .doPrivileged(J2DoPrivHelper .newTemporaryClassLoaderAction((ClassLoader) AccessController .doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()) )); conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(Configuration.INIT_STATE_FREEZING); conf.instantiateAll(); // avoid threading issues PCClassFileTransformer transformer = new PCClassFileTransformer (conf.newMetaDataRepositoryInstance(), opts, tmpLoader); inst.addTransformer(transformer); } }
private static void registerClassLoadEnhancer(Instrumentation inst, Options opts) { OpenJPAConfiguration conf = new OpenJPAConfigurationImpl(); Configurations.populateConfiguration(conf, opts); // don't allow connections conf.setConnectionUserName(null); conf.setConnectionPassword(null); conf.setConnectionURL(null); conf.setConnectionDriverName(null); conf.setConnectionFactoryName(null); // set single class resolver final ClassLoader tmpLoader = (ClassLoader) AccessController .doPrivileged(J2DoPrivHelper .newTemporaryClassLoaderAction((ClassLoader) AccessController .doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()) )); conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(true); conf.instantiateAll(); // avoid threading issues PCClassFileTransformer transformer = new PCClassFileTransformer (conf.newMetaDataRepositoryInstance(), opts, tmpLoader); inst.addTransformer(transformer); } }
private static void registerClassLoadEnhancer(Instrumentation inst, Options opts) { OpenJPAConfiguration conf = new OpenJPAConfigurationImpl(); Configurations.populateConfiguration(conf, opts); // don't allow connections conf.setConnectionUserName(null); conf.setConnectionPassword(null); conf.setConnectionURL(null); conf.setConnectionDriverName(null); conf.setConnectionFactoryName(null); // set single class resolver final ClassLoader tmpLoader = (ClassLoader) AccessController .doPrivileged(J2DoPrivHelper .newTemporaryClassLoaderAction((ClassLoader) AccessController .doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()) )); conf.setClassResolver(new ClassResolver() { public ClassLoader getClassLoader(Class context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(true); conf.instantiateAll(); // avoid threading issues PCClassFileTransformer transformer = new PCClassFileTransformer (conf.newMetaDataRepositoryInstance(), opts, tmpLoader); inst.addTransformer(transformer); } }
conf.setReadOnly(Configuration.INIT_STATE_FREEZING);
conf.setReadOnly(Configuration.INIT_STATE_FREEZING);
conf.setReadOnly(Configuration.INIT_STATE_FREEZING);
void initializeBroker(boolean managed, int connRetainMode, BrokerImpl broker, boolean fromDeserialization) { assertOpen(); makeReadOnly(); // decorate the store manager for data caching and custom // result object providers; always make sure it's a delegating // store manager, because it's easier for users to deal with // that way StoreManager sm = newStoreManager(); DelegatingStoreManager dsm = null; if (_conf.getDataCacheManagerInstance().getSystemDataCache() != null) dsm = new DataCacheStoreManager(sm); dsm = new ROPStoreManager((dsm == null) ? sm : dsm); broker.initialize(this, dsm, managed, connRetainMode, fromDeserialization); if (!fromDeserialization) addListeners(broker); // if we're using remote events, register the event manager so // that it can broadcast commit notifications from the broker RemoteCommitEventManager remote = _conf. getRemoteCommitEventManager(); if (remote.areRemoteEventsEnabled()) broker.addTransactionListener(remote); loadPersistentTypes(broker.getClassLoader()); _brokers.add(broker); _conf.setReadOnly(Configuration.INIT_STATE_FROZEN); }
conf.setReadOnly(Configuration.INIT_STATE_FREEZING);