private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }
private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }
private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }
private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }
private Set newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom( bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet( ConcurrentReferenceHashSet.WEAK); } }
public void registerForValueUpdate(String...values) { if (values == null) return; for (String key : values) { Value value = getRepository().getConfiguration() .getValue(key); if (value != null) value.addListener(this); } }
public void registerForValueUpdate(String...values) { if (values == null) return; for (String key : values) { Value value = getRepository().getConfiguration() .getValue(key); if (value != null) value.addListener(this); } }
public void registerForValueUpdate(String...values) { if (values == null) return; for (String key : values) { Value value = getRepository().getConfiguration() .getValue(key); if (value != null) value.addListener(this); } }
public void registerForValueUpdate(String...values) { if (values == null) return; for (String key : values) { Value value = getRepository().getConfiguration() .getValue(key); if (value != null) value.addListener(this); } }
/** * Create a new factory of the configured type. */ public static OpenJPAEntityManagerFactory newFactory(BrokerFactory bf) { OpenJPAConfiguration conf = bf.getConfiguration(); PluginValue val = (PluginValue) conf.getValue(KEY); if (val == null) return null; EntityManagerFactoryImpl emf = (EntityManagerFactoryImpl) val. instantiate(EntityManagerFactoryImpl.class, conf, true); emf.setBrokerFactory(bf); return emf; }
/** * Create a new factory of the configured type. */ public static OpenJPAEntityManagerFactory newFactory(BrokerFactory bf) { OpenJPAConfiguration conf = bf.getConfiguration(); PluginValue val = (PluginValue) conf.getValue(KEY); if (val == null) return null; EntityManagerFactoryImpl emf = (EntityManagerFactoryImpl) val. instantiate(EntityManagerFactoryImpl.class, conf, true); emf.setBrokerFactory(bf); return emf; }
/** * Create a new factory of the configured type. */ public static OpenJPAEntityManagerFactory newFactory(BrokerFactory bf) { OpenJPAConfiguration conf = bf.getConfiguration(); PluginValue val = (PluginValue) conf.getValue(KEY); if (val == null) return null; EntityManagerFactoryImpl emf = (EntityManagerFactoryImpl) val. instantiate(EntityManagerFactoryImpl.class, conf, true); emf.setBrokerFactory(bf); return emf; }
/** * Create a new factory of the configured type. */ public static OpenJPAEntityManagerFactory newFactory(BrokerFactory bf) { OpenJPAConfiguration conf = bf.getConfiguration(); PluginValue val = (PluginValue) conf.getValue(KEY); if (val == null) return null; EntityManagerFactoryImpl emf = (EntityManagerFactoryImpl) val. instantiate(EntityManagerFactoryImpl.class, conf, true); emf.setBrokerFactory(bf); return emf; }
/** * Create a new factory of the configured type. */ public static OpenJPAEntityManagerFactory newFactory(BrokerFactory bf) { OpenJPAConfiguration conf = bf.getConfiguration(); PluginValue val = (PluginValue) conf.getValue(KEY); if (val == null) return null; EntityManagerFactoryImpl emf = (EntityManagerFactoryImpl) val. instantiate(EntityManagerFactoryImpl.class, conf, true); emf.setBrokerFactory(bf); return emf; }
/** * Sets the type of the partitions. * Each partition is a DataCache itself. * * @param type the name of the type that implements {@linkplain DataCache} interface. * Aliases such as <code>"concurrent"</code> is also recognized. * * @throws Exception if the given type is not resolvable to a loadable type. */ public void setPartitionType(String type) throws Exception { Value value = conf.getValue("DataCache"); ClassLoader ctxLoader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()); ClassLoader loader = conf.getClassResolverInstance().getClassLoader(null, ctxLoader); _type = (Class<? extends DataCache>) AccessController.doPrivileged( J2DoPrivHelper.getForNameAction(value.unalias(type), true, loader)); }
/** * Sets the type of the partitions. * Each partition is a DataCache itself. * * @param type the name of the type that implements {@linkplain DataCache} interface. * Aliases such as <code>"concurrent"</code> is also recognized. * * @throws Exception if the given type is not resolvable to a loadable type. */ public void setPartitionType(String type) throws Exception { Value value = conf.getValue("DataCache"); ClassLoader ctxLoader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()); ClassLoader loader = conf.getClassResolverInstance().getClassLoader(null, ctxLoader); _type = (Class<? extends DataCache>) AccessController.doPrivileged( J2DoPrivHelper.getForNameAction(value.unalias(type), true, loader)); }
/** * Sets the type of the partitions. * Each partition is a DataCache itself. * * @param type the name of the type that implements {@linkplain DataCache} interface. * Aliases such as <code>"concurrent"</code> is also recognized. * * @throws Exception if the given type is not resolvable to a loadable type. */ public void setPartitionType(String type) throws Exception { Value value = conf.getValue("DataCache"); ClassLoader ctxLoader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()); ClassLoader loader = conf.getClassResolverInstance().getClassLoader(null, ctxLoader); _type = (Class<? extends DataCache>) AccessController.doPrivileged( J2DoPrivHelper.getForNameAction(value.unalias(type), true, loader)); }
/** * Sets the type of the partitions. * Each partition is a DataCache itself. * * @param type the name of the type that implements {@linkplain DataCache} interface. * Aliases such as <code>"concurrent"</code> is also recognized. * * @throws Exception if the given type is not resolvable to a loadable type. */ public void setPartitionType(String type) throws Exception { Value value = conf.getValue("DataCache"); ClassLoader ctxLoader = AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()); ClassLoader loader = conf.getClassResolverInstance().getClassLoader(null, ctxLoader); _type = (Class<? extends DataCache>) AccessController.doPrivileged( J2DoPrivHelper.getForNameAction(value.unalias(type), true, loader)); }
managed = conf.isTransactionModeManaged(); else { Value val = conf.getValue("TransactionMode"); managed = Boolean.parseBoolean(val.unalias(str)); retainMode = conf.getConnectionRetainModeConstant(); } else { Value val = conf.getValue("ConnectionRetainMode"); try { retainMode = Integer.parseInt(val.unalias((String) obj));
managed = conf.isTransactionModeManaged(); else { Value val = conf.getValue("TransactionMode"); managed = Boolean.parseBoolean(val.unalias(str)); retainMode = conf.getConnectionRetainModeConstant(); } else { Value val = conf.getValue("ConnectionRetainMode"); try { retainMode = Integer.parseInt(val.unalias((String) obj));