- // ClassLoader classLoader = context.getBundle().getClass()
- // .getClassLoader();
- //
- // Thread cur = Thread.currentThread();
- // ClassLoader save = cur.getContextClassLoader();
- // cur.setContextClassLoader(classLoader);
- //
- // try {
- // // FIXME: make it more generic
- // applicationContext = new ClassPathXmlApplicationContext(
- // "/slc/conf/applicationContext.xml");
- // } catch (Exception e) {
- // throw new Exception("Could not initialize application context", e);
- // } finally {
- // cur.setContextClassLoader(save);
- // }
+ ClassLoader classLoader = getClass().getClassLoader();
+
+ Thread cur = Thread.currentThread();
+ ClassLoader save = cur.getContextClassLoader();
+ cur.setContextClassLoader(classLoader);
+
+ try {
+ // FIXME: make it more generic
+ applicationContext = new ClassPathXmlApplicationContext(
+ "/slc/conf/applicationContext.xml");
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new Exception("Could not initialize application context");
+ } finally {
+ cur.setContextClassLoader(save);
+ }