Hi,
Could you append your testcase(which I can build and deploy), I'll
play with it when I get chance.
Freeman
On 2010-7-22, at 下午10:03, yihfeng wrote:
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.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org