/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2155 by torben, Thu May 8 09:12:00 2014 UTC revision 2158 by torben, Sat May 10 09:26:42 2014 UTC
# Line 14  import java.util.logging.Logger; Line 14  import java.util.logging.Logger;
14  import dk.daoas.fulddaekning.BoundingBox.BoundingBoxException;  import dk.daoas.fulddaekning.BoundingBox.BoundingBoxException;
15    
16  public class Lookup {  public class Lookup {
17    
18            static final String CONFIG_FILENAME = "fulddaekning.properties";
19    
20          static int max_workers;          static int max_workers;
21          static boolean verbose;          static boolean verbose;
22                    
23          static Properties conf;          static SafeProperties conf;
24          static Logger logger = Logger.getLogger( Lookup.class.toString() );          static Logger logger = Logger.getLogger( Lookup.class.toString() );
25                    
26          int postnr;          int postnr;
# Line 155  public class Lookup { Line 158  public class Lookup {
158                    
159          public static void main(String[] args) throws Exception {          public static void main(String[] args) throws Exception {
160                                    
161                  File confFile = new File("fulddaekning.properties");                  File confFile = new File( CONFIG_FILENAME );
162                  if (! confFile.exists() ) {                  if (! confFile.exists() ) {
163                          logger.warning("Config file not found");                          logger.warning("Config file not found: " + CONFIG_FILENAME);
164                          System.exit(1);                          System.exit(1);
165                  }                  }
166                                                                    
167                  conf = new Properties();                  conf = new SafeProperties();
168                  conf.load( new FileReader(confFile) );                  conf.load( new FileReader(confFile) );
169                                    
170                  max_workers = Integer.parseInt( conf.getProperty("MAX_WORKERS") );                  max_workers = Integer.parseInt( conf.getSafeProperty("MAX_WORKERS") );
171                  logger.info("Starting with MAX_WORKERS:" + max_workers);                  logger.info("Starting with MAX_WORKERS:" + max_workers);
172                                    
173                  verbose = Boolean.parseBoolean( conf.getProperty("VERBOSE") );                  verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") );
174                  logger.info("Starting with VERBOSE:" + verbose);                  logger.info("Starting with VERBOSE:" + verbose);
175                                    
176                  Database db = new Database(conf);                  Database db = new Database(conf);

Legend:
Removed from v.2155  
changed lines
  Added in v.2158

  ViewVC Help
Powered by ViewVC 1.1.20