Hello Tamaya devs,

I am trying to get Tamaya running in my karaf 4.1.1 to read some configurations 
of different types (properties, xml) and from different locations (inside 
bundles, etc Folder).


I've read that the OSGi support will be improved for version 0.4 and that maybe 
some of my problems will be gone but I want to share you some questions and 
problems I faced during my first steps:


  *   the artifact of the karaf features seems to be tamaya-features instead of 
tamaya-karaf-features like prompted on the homepage
  *   the feature.xml for 0.3-incubating seems to be incomplete, it only 
contains the geronimo-annotation bundle
  *   there were some more bundles needed to get all bundles started (like 
resolver, resources, injection, events)


Beside that I have problems reading xml files as properties. I found out that 
there is a pre-defined PropertiesXmlFormat that can be used so I tried to load 
the xml files by

ConfigResources.getResourceResolver().getResources("META-INF/**/*")

and assign the format to each URL with

ConfigurationFormats.createPropertySource({url},ConfigurationFormats.getFormats("xml"))

Maybe there is a better approch doing this...


But I get an error that no ResourceResolver is available. I digged a little bit 
in the code and indicated that the DefaultResourceResolver service should be 
loaded by the OSGIServiceLoader.

But the OSGIServiceLoader only handle the STARTING and STOPPING event while it 
gets only invoked for STARTED and STOPPED events. I noticed somewhere that only 
SynchronousBundleListener will get STARTING and STOPPING events so I wonder how 
to solve this ServiceLoader problem.


Another thing I noticed: it seems that after installing the tamaya bundles the 
property-placeholder in my blueprint.xml using properties from the etc folder 
are not working anymore. Do I have to change the properties because of getting 
the tamaya Configuration Admin Service now?



But beside that problems I am happy that there might be a solution to handle 
the configurations for my karaf projects, so keep up the good work!


Greetings,

Christian Niehues

Reply via email to