Thanks, Freeman, for the quick response.

Unfortunately, I tried the following, both did not work.

ApplicationContext ctx = new
ClassPathXmlApplicationContext("classpath:dataSourceApplicationContext.xml"); 

ApplicationContext ctx = new
ClassPathXmlApplicationContext("classpath*:dataSourceApplicationContext.xml"); 

Any other suggestion might allow java code to read a config from the bundle
itself?


We now use "import source" within beans.xml to load the above config file.

        <import resource="classpath:dataSourceApplicationContext.xml" />

We also changed our java code to use spring bean defined in the above config
file to make our application works.

Shouldn't there be an easier way to read a config file from the java code
within a bundle?

 
-- 
View this message in context: 
http://servicemix.396122.n5.nabble.com/not-able-to-read-config-file-from-java-code-within-a-bundle-tp1727886p1842315.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to