If you use ConfigAdmin directly or indirectly, you need to specify a
configuration id to load the properties from.  A single configuration
can be used by multiple bundles at the same time, so it's just about
using the same id for multiple bundles.
If you name the file myApp.cfg, the id of the configuration will be 'myApp'.

On Thu, Dec 9, 2010 at 22:52, Mike Van <mvangeert...@comcast.net> wrote:
>
>
>
> We were just talking about the differences between bundles we should use as 
> services, and bundles that simply need to be wired.  In my definition, all 
> cross-cutting concerns should be services consumed by their bundles.  We also 
> have been discussing whether or not the services should all be stateless (I 
> beleive they should be).
>
>
>
> So, for the time being, if my bundles are all myApp.*, would a myApp.cfg file 
> placed in the etc directory be read by all bundles whose packages start with 
> myApp?
>
>
>
>
> ----- Original Message -----
> From: "Łukasz Dywicki [via Karaf]" 
> <ml-node+2060113-309240584-228...@n3.nabble.com>
> To: "Mike Van" <mvangeert...@comcast.net>
> Sent: Thursday, December 9, 2010 4:06:15 PM
> Subject: RE: Placing properties files in the classpath
>
> No,
> These bundles may reffer same persistent id (configuration file) without 
> problems.
>
> In fact - you may introduce new bundle which produces connection factory and 
> export it as service to reduce number of configuration dependencies.
>
> Best regards,
> Lukasz
>
> -----Original Message-----
> From: Mike Van [mailto: [hidden email] ]
> Sent: Thursday, December 09, 2010 10:03 PM
> To: [hidden email]
> Subject: Re: Placing properties files in the classpath
>
>
>
>
> Ok.
>
>
>
> If I have 4 bundles that all use JMS, and they are named:
>
> myApp.bundle1
>
> myApp.bundle2
>
> myApp.bundle3
>
> myApp.bundle4
>
>
>
> Would I need 4 configuration files in etc:
>
> myApp.bundle1.cfg
>
> myApp.bundle2.cfg
>
> myApp.bundle3.cfg
>
> myApp.bundle4.cfg
>
>
>
> ?
>
>
> ----- Original Message -----
> From: "Łukasz Dywicki [via Karaf]" < [hidden email] >
> To: "Mike Van" < [hidden email] >
> Sent: Thursday, December 9, 2010 3:58:32 PM
> Subject: RE: Placing properties files in the classpath
>
> It depends on the configuration admin. Karaf uses etc directory for these
> configurations - eg. If you persistence id is set to com.mycompany any
> changes in $KARAF_BASE/etc/com.mycompany.cfg will be visible for your
> components. It doesn't look classpath, it looks into etc directory. That's
> better than classpath because operations can do changes without JAR
> modification. Even more fantastic is fact that your component can be
> notified about configuration change..
>
>
> Best regards,
> Lukasz
>
>
> -----Original Message-----
> From: Mike Van [mailto: [hidden email] ]
> Sent: Thursday, December 09, 2010 9:42 PM
> To: [hidden email]
> Subject: RE: Placing properties files in the classpath
>
>
> In those cases, where does OSGi look to find the properties? And, what are
> the property file names?
>
> Mike Van
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Placing-properties-files-in-the-classpath-
> tp2054553p2060007.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>
>
>
>
>
> View message @ 
> http://karaf.922171.n3.nabble.com/Placing-properties-files-in-the-classpath-tp2054553p2060078.html
> To start a new topic under Karaf - User, email [hidden email]
> To unsubscribe from Karaf - User, click here .
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Placing-properties-files-in-the-classpath-tp2054553p2060101.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>
>
>
>
>
> View message @ 
> http://karaf.922171.n3.nabble.com/Placing-properties-files-in-the-classpath-tp2054553p2060113.html
> To start a new topic under Karaf - User, email 
> ml-node+930749-917263437-228...@n3.nabble.com
> To unsubscribe from Karaf - User, click here .
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Placing-properties-files-in-the-classpath-tp2054553p2060367.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to