List of usage examples for org.apache.commons.configuration SystemConfiguration setSystemProperties
public static void setSystemProperties(PropertiesConfiguration systemConfig)
From source file:com.netflix.hystrix.contrib.metrics.controller.HystricsMetricsControllerTest.java
@Override protected Application configure() { int port = 0; try {//w w w. j a v a2 s . c o m final ServerSocket socket = new ServerSocket(0); port = socket.getLocalPort(); socket.close(); } catch (IOException e1) { throw new RuntimeException("Failed to find port to start test server"); } set(TestProperties.CONTAINER_PORT, port); try { SystemConfiguration.setSystemProperties("test.properties"); } catch (Exception e) { throw new RuntimeException("Failed to load config file"); } return new ResourceConfig(HystricsMetricsControllerTest.class, HystrixStreamFeature.class); }
From source file:org.wso2.ppaas.tools.artifactmigration.ConversionTool.java
/** * Method to get configuration details/*from ww w . j a v a 2 s . co m*/ */ public static void readInitialConfiguration() throws ConfigurationException { final PropertiesConfiguration propsConfig = new PropertiesConfiguration( System.getProperty(Constants.CONFIGURATION_FILE_NAME)); SystemConfiguration.setSystemProperties(propsConfig); }