You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by will_mad <wi...@eads.com> on 2007/11/20 11:52:00 UTC

Read a configuration file inside a servicemix-bean pojo

Hi,
I would like to access a configuration file inside my pojo in a
servicemix-bean su. 
Any ideas on how to do this? Is it possible to add its own attributes in
xbean.xml and access it inside my pojo?
Thanks for you help.
William
-- 
View this message in context: http://www.nabble.com/Read-a-configuration-file-inside-a-servicemix-bean-pojo-tf4842626s12049.html#a13854519
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Read a configuration file inside a servicemix-bean pojo

Posted by Gert Vanthienen <ge...@skynet.be>.
William,

You should be able to read a configuration file just like you do in 
plain Java code actually.  You either access it from local disk or some 
other datastore or you add it to your SU and read it from the classspath.

The xbean.xml file is just an enhanced version of a Spring configuration 
file, so you can do easily use Spring to set properties of your 
classes.  You can also add you own beans in there and refer to them 
using the #id syntax.

Gert

will_mad wrote:
> Hi,
> I would like to access a configuration file inside my pojo in a
> servicemix-bean su. 
> Any ideas on how to do this? Is it possible to add its own attributes in
> xbean.xml and access it inside my pojo?
> Thanks for you help.
> William
>