equal
deleted
inserted
replaced
37 |
37 |
38 private static final Logger log = Logger.getLogger(Loader.class.getName()); |
38 private static final Logger log = Logger.getLogger(Loader.class.getName()); |
39 |
39 |
40 public Configuration loadConfiguration() throws ConfigurationException { |
40 public Configuration loadConfiguration() throws ConfigurationException { |
41 try { |
41 try { |
42 JAXBContext jaxb = JAXBContext.newInstance(Configuration.class); |
42 JAXBContext jaxb = JAXBContext.newInstance(Configuration.class.getPackage().getName(), Configuration.class.getClassLoader()); |
43 Unmarshaller u = jaxb.createUnmarshaller(); |
43 Unmarshaller u = jaxb.createUnmarshaller(); |
44 return (Configuration) u.unmarshal(Constants.CONFIG_FILE); |
44 return (Configuration) u.unmarshal(Constants.CONFIG_FILE); |
45 } catch (Exception e) { |
45 } catch (Exception e) { |
46 throw new ConfigurationException("Unable to load configuration from " + Constants.CONFIG_FILE, e); |
46 throw new ConfigurationException("Unable to load configuration from " + Constants.CONFIG_FILE, e); |
47 } |
47 } |