/** * Set the value of this property in the given provider. */ public static void set(ConfigurationProvider cp, String value) { String key = ProductDerivations.getConfigurationKey(KEY, cp.getProperties()); cp.addProperty(key, value); }
/** * This method loads the named resource as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>properties</code> value with the name of a resource. */ public void setProperties(String resourceName) throws IOException { ProductDerivations.load(resourceName, null, getClass().getClassLoader()).setInto(this); _auto = resourceName; }
/** * Extract the value of this property if set in the given provider. */ public static Object get(ConfigurationProvider cp) { Map props = cp.getProperties(); return props.get(ProductDerivations.getConfigurationKey(KEY, props)); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Extract the value of this property if set in the given provider. */ public static Object get(ConfigurationProvider cp) { Map props = cp.getProperties(); return props.get(ProductDerivations.getConfigurationKey(KEY, props)); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * This method loads the named file as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>propertiesFile</code> value with the name of a file. */ public void setPropertiesFile(File file) throws IOException { ProductDerivations.load(file, null, getClass().getClassLoader()). setInto(this); _auto = file.toString(); }
/** * Set the value of this property in the given provider. */ public static void set(ConfigurationProvider cp, String value) { String key = ProductDerivations.getConfigurationKey(KEY, cp.getProperties()); cp.addProperty(key, value); }
/** * Extract the value of this property if set in the given provider. */ public static Object get(ConfigurationProvider cp) { Map props = cp.getProperties(); return props.get(ProductDerivations.getConfigurationKey(KEY, props)); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Configure itself as well as underlying slices. * */ public DistributedJDBCConfigurationImpl(ConfigurationProvider cp) { this(); cp.setInto(this); setDiagnosticContext(this); }
/** * Set the value of this property in the given provider. */ public static void set(ConfigurationProvider cp, String value) { String key = ProductDerivations.getConfigurationKey(KEY, cp.getProperties()); cp.addProperty(key, value); }
/** * Extract the value of this property if set in the given provider. */ public static Object get(ConfigurationProvider cp) { Map props = cp.getProperties(); return props.get(ProductDerivations.getConfigurationKey(KEY, props)); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Configure itself as well as underlying slices. * */ public DistributedJDBCConfigurationImpl(ConfigurationProvider cp) { this(); cp.setInto(this); setDiagnosticContext(this); }
/** * Set the value of this property in the given provider. */ public static void set(ConfigurationProvider cp, String value) { String key = ProductDerivations.getConfigurationKey(KEY, cp.getProperties()); cp.addProperty(key, value); }
/** * Extract the value of this property if set in the given provider. */ public static Object get(ConfigurationProvider cp) { Map props = cp.getProperties(); return props.get(ProductDerivations.getConfigurationKey(KEY, props)); }
/** * Factory method for constructing a {@link BrokerFactory} * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}. */ public static AbstractStoreBrokerFactory newInstance (ConfigurationProvider cp) { // use a tmp store manager to get metadata about the capabilities of // this runtime Map map = cp.getProperties(); String storePlugin = (String) map.get(ProductDerivations .getConfigurationKey(PROP_ABSTRACT_STORE, map)); String storeCls = Configurations.getClassName(storePlugin); String storeProps = Configurations.getProperties(storePlugin); AbstractStoreManager store = createStoreManager(storeCls, storeProps); // populate configuration OpenJPAConfiguration conf = store.newConfiguration(); cp.setInto(conf); conf.supportedOptions().removeAll(store.getUnsupportedOptions()); // create and pool a new factory return new AbstractStoreBrokerFactory(conf, storeCls, storeProps, store.getPlatform()); }
/** * Configure itself as well as underlying slices. * */ public DistributedJDBCConfigurationImpl(ConfigurationProvider cp) { this(); cp.setInto(this); setDiagnosticContext(this); }
/** * Set the value of this property in the given provider. */ public static void set(ConfigurationProvider cp, String value) { String key = ProductDerivations.getConfigurationKey(KEY, cp.getProperties()); cp.addProperty(key, value); }