When I started seriously doing OSGi last year, I've come to like
Declarative Services. I'm currently running an application in production
which consists of many such components. Some of them are factory
components. What I liked about them was that I could add a new
configuration via FileInstall's configuration file feature which would
give me a service for each configuration. Currently, I'm running an SCR
1.0.9.SNAPSHOT which basically works fine but shows problems on startup
in that it often does not enable all components properly (an admin
nuisance, but not a big one since the application can easily run for
months without a restart even with the occasional update of a bundle).
Still, I want to get rid of that problem.

So I upgraded to Karaf 1.4 and SCR 1.4.1, but I had to realize that
SCR 1.0.9 seemed to contain a bug which I seem to have made use of.
Right now, my component configurations in ConfigAdmin don't result in
services being registered. Only if I set "ds.factory.enabled=true" do I
get my desired functionality back. I've read back and forth in the DS
spec but I find it extremely difficult to understand. In the end, I'm
clueless whether what I want is actually possible (as per the DS spec)
without making the component implement ManagedServiceFactory which would
make my components more complicated. Without the non-standard setting
above, I just get a ComponentFactory registered, but I don't really want
to instantiate each component through method calls.

I'd appreciate some clues on this issue.

Thanks,
Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to