Hi Ivo, Well, the ManagedService interface is intended for exactly the situation in which you don't know when a configuration shows up, but you _do_ need it; you can read all about it in the OSGi Compendium, section 104. The DependencyManager has a mechanism to declare a dependency on a configuration, which should be used in this case.
Angelo On Oct 7, 2010, at 9:10 AM, Ivo Ladage-van Doorn wrote: > Hi Angelo, > > The Thread.sleep construction in ConfigTemplateManager was necessary using > fileinstall. Using fileinstall you never know when your configuration is > 'present' (deployed). But doesn't apply the same issue to the new central > configuration bundle approach? > Since the ConfigTemplateManager and central config bundle have no dependency, > you need a mechanism to ensure that the configuration is added to config > admin before the ConfigTemplateManager service is started (the > ConfigTemplateManager needs the config for initialization). > I guess we could fix this using service dependencies with filters, like we > did for Cassandra and ColumnFamilies being available. In general we will need > a mechanism to ensure that your service is started only when the > configuration that belongs to the bundle that holds the service is available > in config admin. > > Regards, Ivo > > -----Original Message----- > From: amdatu-developers-bounces at amdatu.org > [mailto:amdatu-developers-bounces at amdatu.org] On Behalf Of Angelo van der > Sijpt > Sent: woensdag 6 oktober 2010 20:19 > To: amdatu-developers at amdatu.org > Subject: [Amdatu-developers] Usage of configurations > > Hi list, > > As I mentioned earlier, a number of services use Config Admin in a peculiar > way; I believe this might be responsible for the problems I sometimes see > when updating bundles in a running system. A typical example is > ConfigTemplateManagerImpl, which sleeps while waiting for its configuration > to show up. > > It will probably be best to refactor this in one fell swoop, but we should > first identify the places where this is relevant. If the list agrees, I will > go ahead and create a Jira issue which we can use to compile these places. > > Angelo > _______________________________________________ > Amdatu-developers mailing list > Amdatu-developers at amdatu.org > http://lists.amdatu.org/mailman/listinfo/amdatu-developers > > _______________________________________________ > Amdatu-developers mailing list > Amdatu-developers at amdatu.org > http://lists.amdatu.org/mailman/listinfo/amdatu-developers

