1 24 25 package org.objectweb.jtests.jms.framework; 26 import java.util.Properties ; 27 28 34 public class TestConfig { 35 36 private static final String PROP_FILE_NAME = "test.properties"; 38 39 private static final String PROP_NAME = "timeout"; 41 42 46 public static final long TIMEOUT; 47 48 static { 49 long tempTimeOut = 0; 51 try { 52 Properties props = new Properties (); 53 props.load(ClassLoader.getSystemResourceAsStream(PROP_FILE_NAME)); 54 props.list(System.out); 55 tempTimeOut = Long.parseLong(props.getProperty(PROP_NAME, "0")); 56 } catch (Exception e) { 57 tempTimeOut = 0; 58 } finally { 59 TIMEOUT = tempTimeOut; 60 } 61 } 62 } 63 | Popular Tags |