-
1. Re: How to read file relative to ServiceMix Home
ffang Jun 2, 2011 9:40 PM (in response to jmandawg)Hi,
Use
new FileInputStream("etc/desc/myDescriptorfile.xml")
should work.
However, why not put the resource files into your own bundle? It's better for portable.
Freeman
-
2. Re: How to read file relative to ServiceMix Home
jmandawg Jun 2, 2011 10:35 PM (in response to ffang)Thanks, i will give it a go tomorrow. Right now i have them inside the bundle, but i can't (or don't know how) to modify the descriptor files without re-bundling and re-deploying the bundle.
This way i can just stop the bundle modify the descriptor file and restart it.
There are also some other binary files in the bundle right now that i want to move to the etc folder because they are causing the bundle to be very large, and cumbersome to move between systems.
Thanks again, i hope it works.
-
3. Re: How to read file relative to ServiceMix Home
ffang Jun 2, 2011 10:51 PM (in response to jmandawg)Hi,
You shouldn't put bundle specific resources into container etc, it might work but it's not a good practice.
Freeman
-
4. Re: How to read file relative to ServiceMix Home
jmandawg Jun 2, 2011 11:04 PM (in response to ffang)What is best practice? To put them in the bundle?
If so, is there anyway to modify a file in the bundle without re-bundling/re-deploying?
Edited by: jmandawg on Jun 3, 2011 3:03 AM
-
5. Re: How to read file relative to ServiceMix Home
ffang Jun 2, 2011 11:33 PM (in response to jmandawg)Hi,
Yeah, you should put them in bundle as much as possible, during development time, you need rebuild/redeploy, but during production time, bundle is stable and a self-contained bundle is more easy to maintain.
Freeman
-
6. Re: How to read file relative to ServiceMix Home
jmandawg Jun 3, 2011 12:07 AM (in response to ffang)Cool, Thanks for the help, I'm new to the OSGI world and i really appreciate it.