# HG changeset patch # User František Kučera # Date 1431861321 -7200 # Node ID 5a18a6adf7f9b32022dd25b9a81f7594fc7ef556 # Parent a32bfcbdee51b6289711c28e694480a33f877733 configuration loading: use JAXB index and set classloader (useful while embedding into Netbeans and other applications) diff -r a32bfcbdee51 -r 5a18a6adf7f9 java/sql-dk/src/info/globalcode/sql/dk/configuration/Loader.java --- 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) { diff -r a32bfcbdee51 -r 5a18a6adf7f9 java/sql-dk/src/info/globalcode/sql/dk/configuration/jaxb.index --- /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