public DQPConfiguration() { properties = PropertiesUtils.getCombinedProperties(); }
public DQPConfiguration() { properties = PropertiesUtils.getCombinedProperties(); }
public static synchronized SocketServerConnectionFactory getInstance() { if (INSTANCE == null) { INSTANCE = new SocketServerConnectionFactory(); Properties props = PropertiesUtils.getCombinedProperties(); InputStream is = SocketServerConnectionFactory.class.getResourceAsStream("/teiid-client-settings.properties"); //$NON-NLS-1$ if (is != null) { Properties newProps = new Properties(); try { newProps.load(is); } catch (IOException e) { } finally { try { is.close(); } catch (IOException e) { } } props.putAll(newProps); } INSTANCE.initialize(props); } return INSTANCE; }
public static synchronized SocketServerConnectionFactory getInstance() { if (INSTANCE == null) { INSTANCE = new SocketServerConnectionFactory(); Properties props = PropertiesUtils.getCombinedProperties(); InputStream is = SocketServerConnectionFactory.class.getResourceAsStream("/teiid-client-settings.properties"); //$NON-NLS-1$ if (is != null) { Properties newProps = new Properties(); try { newProps.load(is); } catch (IOException e) { } finally { try { is.close(); } catch (IOException e) { } } props.putAll(newProps); } INSTANCE.initialize(props); } return INSTANCE; }
@Test public void testCombinedProperties() { String old = System.setProperty("org.teiid.val", "200"); try { MyBean test = new MyBean(); PropertiesUtils.setBeanProperties(test, PropertiesUtils.getCombinedProperties(), "org.teiid", true); assertEquals(200, test.getVal()); } finally { if (old != null) { System.setProperty("org.teiid.val", old); } else { System.clearProperty("org.teiid.val"); } } } }