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