/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/db/DatabaseCoverageUpdate.java
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/db/DatabaseCoverageUpdate.java

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

revision 3034 by torben, Mon May 2 06:38:24 2016 UTC revision 3035 by torben, Mon May 2 17:50:14 2016 UTC
# Line 24  public class DatabaseCoverageUpdate  { Line 24  public class DatabaseCoverageUpdate  {
24                    
25          //static boolean DEBUG = false;          //static boolean DEBUG = false;
26                    
27          private static TaskLogger logger = TaskLogger.getInstance();          private TaskLogger logger = TaskLogger.getInstance();
28                    
29          static Properties queries;          Properties queries;
30                    
31          static {          public DatabaseCoverageUpdate() throws SQLException {
32                  try {  
33                          //On some platforms it may be necessary to load as "META-INF/queries.properties"                  //On some platforms it may be necessary to load as "META-INF/queries.properties"
34                          ClassLoader classLoader = Thread.currentThread().getContextClassLoader();                  ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
35                          InputStream is = classLoader.getResourceAsStream("sql.xml");                  InputStream is = classLoader.getResourceAsStream("sql.xml");
36                                                    
37                          queries = new Properties();                  queries = new Properties();
38                    try {
39                          queries.loadFromXML(is);                          queries.loadFromXML(is);
                           
                           
40                  } catch (Exception e) {                  } catch (Exception e) {
41                          logger.warning("error", e);                          throw new SQLException("Error loading queries", e);
                         throw new RuntimeException(e); //Escalate it to a runtime exception  
42                  }                  }
43                            
44          }          }
45                    
46                    

Legend:
Removed from v.3034  
changed lines
  Added in v.3035

  ViewVC Help
Powered by ViewVC 1.1.20