Hello Hakkers, 

today I am interested how you usually configure your bundles inside an OSGi 
container. 

I can easily access the application.conf provided with Akka itself to get 
to all the default values. I can also provide bundle specific configuration 
in separate files and my bundle would pick up those. 

However, I have just done some experimenting with Spray in OSGi and the 
problem is as follows:

Several spray bundles contain resource.conf files with default values that 
make sense to configure spray. On top of that the user has to provide some 
additional values to make his route work. 
The ActorSystem that lives in some bundle not knowing about spray does not 
see the resource.conf files provided by spray and the user-bundle should 
only contain the values it wishes to add or override. 

I have seen examples to do some classloader tweaking (e.g. [1]) to bring 
the resource.conf files into scope when the ActorSystem is initialized. 
>From my (probably limited) understanding that would kind of defeat the 
purpose of OSGi. The ActorSystem shouldn't know about the bundles that are 
installed and may contribute to the configuration. My current solution is 
to replicate the spray settings in my bundle's conf file, but that somehow 
doesn't feel right either. 

I was wondering whether someone has thought about / tried to implement some 
kind of whiteboard pattern ? - I am thinking along the lines of an Akka 
config service that starts with the default application.conf. The extender 
would merge resource.conf files as akka bundles are installed remove the 
settings again when the bundle is uninstalled. Does the Config API provide 
such functionality ? 

Well, I just wanted to hear some thoughts before diving into such an 
extender .... 


[1] https://groups.google.com/forum/#!topic/spray-user/lmcdBsxNzdQ


Thanks and best regards
Andreas

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to