public void configure(Type type, Properties params, Dialect d) { super.configure(type, params, d); maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass(); }
/** * Builds a new {@link Cache} instance, and gets it's properties from the OSCache {@link Config} * which reads the properties file (<code>oscache.properties</code>) from the classpath. * If the file cannot be found or loaded, an the defaults are used. * * @param region * @param properties * @return * @throws CacheException */ public Cache buildCache(String region, Properties properties) throws CacheException { int refreshPeriod = PropertiesHelper.getInt( StringHelper.qualify(region, OSCACHE_REFRESH_PERIOD), OSCACHE_PROPERTIES, CacheEntry.INDEFINITE_EXPIRY ); String cron = OSCACHE_PROPERTIES.getProperty( StringHelper.qualify(region, OSCACHE_CRON) ); // construct the cache final OSCache cache = new OSCache(refreshPeriod, cron, region); Integer capacity = PropertiesHelper.getInteger( StringHelper.qualify(region, OSCACHE_CAPACITY), OSCACHE_PROPERTIES ); if ( capacity!=null ) cache.setCacheCapacity( capacity.intValue() ); return cache; }
/** * Builds a new {@link Cache} instance, and gets it's properties from the OSCache {@link Config} * which reads the properties file (<code>oscache.properties</code>) from the classpath. * If the file cannot be found or loaded, an the defaults are used. * * @param region * @param properties * @return * @throws CacheException */ public Cache buildCache(String region, Properties properties) throws CacheException { int refreshPeriod = PropertiesHelper.getInt( StringHelper.qualify(region, OSCACHE_REFRESH_PERIOD), OSCACHE_PROPERTIES, CacheEntry.INDEFINITE_EXPIRY ); String cron = OSCACHE_PROPERTIES.getProperty( StringHelper.qualify(region, OSCACHE_CRON) ); // construct the cache final OSCache cache = new OSCache(refreshPeriod, cron, region); Integer capacity = PropertiesHelper.getInteger( StringHelper.qualify(region, OSCACHE_CAPACITY), OSCACHE_PROPERTIES ); if ( capacity!=null ) cache.setCacheCapacity( capacity.intValue() ); return cache; }
public void configure(Type type, Properties params, Dialect d) throws MappingException { super.configure(type, params, d); maxLo = PropertiesHelper.getInt(MAX_LO, params, 9); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass(); }
poolSize = PropertiesHelper.getInt(Environment.POOL_SIZE, props, 20); //default pool size 20 log.info("Using Hibernate built-in connection pool (not for production use!)"); log.info("Hibernate connection pool size: " + poolSize);
public void configure(Type type, Properties params, Dialect d) { super.configure(type, params, d); maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass(); }
poolSize = PropertiesHelper.getInt(Environment.POOL_SIZE, props, 20); //default pool size 20 log.info("Using Hibernate built-in connection pool (not for production use!)"); log.info("Hibernate connection pool size: " + poolSize);
public void configure(Type type, Properties params, Dialect d) throws MappingException { super.configure(type, params, d); maxLo = PropertiesHelper.getInt(MAX_LO, params, 9); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass(); }
int batchSize = PropertiesHelper.getInt(Environment.STATEMENT_BATCH_SIZE, properties, 0); if ( !metaSupportsBatchUpdates ) batchSize = 0; if (batchSize>0) log.info("JDBC batch size: " + batchSize); if (maxFetchDepth!=null) log.info("Maximum outer join fetch depth: " + maxFetchDepth); settings.setMaximumFetchDepth(maxFetchDepth); int batchFetchSize = PropertiesHelper.getInt(Environment.DEFAULT_BATCH_FETCH_SIZE, properties, 1); log.info("Default batch fetch size: " + batchFetchSize); settings.setDefaultBatchFetchSize(batchFetchSize);
public void configure(Type type, Properties params, Dialect d) { super.configure(type, params, d); maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass(); }
int batchSize = PropertiesHelper.getInt(Environment.STATEMENT_BATCH_SIZE, properties, 0); if ( !metaSupportsBatchUpdates ) batchSize = 0; if (batchSize>0) log.info("JDBC batch size: " + batchSize); if (maxFetchDepth!=null) log.info("Maximum outer join fetch depth: " + maxFetchDepth); settings.setMaximumFetchDepth(maxFetchDepth); int batchFetchSize = PropertiesHelper.getInt(Environment.DEFAULT_BATCH_FETCH_SIZE, properties, 1); log.info("Default batch fetch size: " + batchFetchSize); settings.setDefaultBatchFetchSize(batchFetchSize);
valueColumnName = PropertiesHelper.getString(VALUE_COLUMN_NAME, params, DEFAULT_VALUE_COLUMN); initialHi = PropertiesHelper.getInt(INITIAL_HI, params, DEFAULT_INITIAL_HI); String schemaName = params.getProperty(SCHEMA); String catalogName = params.getProperty(CATALOG); keySize = PropertiesHelper.getInt(PK_LENGTH_NAME, params, DEFAULT_PK_LENGTH); keyValue = PropertiesHelper.getString(PK_VALUE_NAME, params, params.getProperty(TABLE)); maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass();
int minPoolSize = PropertiesHelper.getInt(Environment.C3P0_MIN_SIZE, props, 1); int maxPoolSize = PropertiesHelper.getInt(Environment.C3P0_MAX_SIZE, props, 100); int maxIdleTime = PropertiesHelper.getInt(Environment.C3P0_TIMEOUT, props, 0); int maxStatements = PropertiesHelper.getInt(Environment.C3P0_MAX_STATEMENTS, props, 0); int acquireIncrement = PropertiesHelper.getInt(Environment.C3P0_ACQUIRE_INCREMENT, props, 1); int idleTestPeriod = PropertiesHelper.getInt(Environment.C3P0_IDLE_TEST_PERIOD, props, 0);
String schemaName = params.getProperty(SCHEMA); String catalogName = params.getProperty(CATALOG); keySize = PropertiesHelper.getInt(PK_LENGTH_NAME, params, DEFAULT_PK_LENGTH); String keyValue = PropertiesHelper.getString(PK_VALUE_NAME, params, params.getProperty(TABLE) ); maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass();
int minPoolSize = PropertiesHelper.getInt(Environment.C3P0_MIN_SIZE, props, 1); int maxPoolSize = PropertiesHelper.getInt(Environment.C3P0_MAX_SIZE, props, 100); int maxIdleTime = PropertiesHelper.getInt(Environment.C3P0_TIMEOUT, props, 0); int maxStatements = PropertiesHelper.getInt(Environment.C3P0_MAX_STATEMENTS, props, 0); int acquireIncrement = PropertiesHelper.getInt(Environment.C3P0_ACQUIRE_INCREMENT, props, 1); int idleTestPeriod = PropertiesHelper.getInt(Environment.C3P0_IDLE_TEST_PERIOD, props, 0);
String schemaName = params.getProperty(SCHEMA); String catalogName = params.getProperty(CATALOG); this.keySize = PropertiesHelper.getInt(PK_LENGTH_NAME, params, DEFAULT_PK_LENGTH); String keyValue = PropertiesHelper.getString(PK_VALUE_NAME, params, params.getProperty(TABLE) ); maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); lo = maxLo + 1; // so we "clock over" on the first invocation returnClass = type.getReturnedClass();