<parent>
<groupId>org.argeo.slc</groupId>
<artifactId>argeo-slc</artifactId>
- <version>0.10.3-SNAPSHOT</version>
+ <version>0.11.1-SNAPSHOT</version>
<relativePath>../org.argeo.slc</relativePath>
</parent>
<artifactId>org.argeo.slc.autoui.launcher.launcher</artifactId>
<artifactId>spring-beans</artifactId>
<version>2.0.8</version>
</dependency>
+
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
private AbstractApplicationContext applicationContext;
public void start(BundleContext context) throws Exception {
- // 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);
+ }
// applicationContext = new GenericApplicationContext();
// XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(
// }
Properties properties = new Properties();
- AutoUiApplicationJemmy applicationJemmy = new AutoUiApplicationJemmy();
- // AutoUiApplicationJemmy applicationJemmy = (AutoUiApplicationJemmy)
- // applicationContext
- // .getBean("jemmyTest");
+ // AutoUiApplicationJemmy applicationJemmy = new
+ // AutoUiApplicationJemmy();
+ AutoUiApplicationJemmy applicationJemmy = (AutoUiApplicationJemmy) applicationContext
+ .getBean("jemmyTest");
context.registerService(AutoUiApplication.class.getName(),
applicationJemmy, properties);
stdOut("JemmyTest started");