configuration loading: use JAXB index and set classloader (useful while embedding into Netbeans and other applications)
1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/Loader.java Sun May 17 00:27:56 2015 +0200
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/Loader.java Sun May 17 13:15:21 2015 +0200
1.3 @@ -39,7 +39,7 @@
1.4
1.5 public Configuration loadConfiguration() throws ConfigurationException {
1.6 try {
1.7 - JAXBContext jaxb = JAXBContext.newInstance(Configuration.class);
1.8 + JAXBContext jaxb = JAXBContext.newInstance(Configuration.class.getPackage().getName(), Configuration.class.getClassLoader());
1.9 Unmarshaller u = jaxb.createUnmarshaller();
1.10 return (Configuration) u.unmarshal(Constants.CONFIG_FILE);
1.11 } catch (Exception e) {
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/jaxb.index Sun May 17 13:15:21 2015 +0200
2.3 @@ -0,0 +1,1 @@
2.4 +Configuration
2.5 \ No newline at end of file