2014-07-23 11:42 GMT+02:00 Bertrand Delacretaz <bdelacre...@apache.org>:
> Hi, > > On Wed, Jul 23, 2014 at 11:04 AM, Carsten Ziegeler <cziege...@apache.org> > wrote: > > ...we now have a case where this is a > > problem - but why not just fix this?... > > We need to fix that case, sure, but the current behavior is not clean > - we probably have several similar potential "node creation race > conditions" at startup. > Probably, but maybe not :) Can we find this out? > > > ...*if* we want to do something about it, why not have this as a > > configuration of the resource resolver factory? Before it registers > itself > > it makes sure that the required resources are created/available. No need > > for additional services or dependencies.... > > Good idea, but services which go directly to the repository do not > currently have a dependency on that factory. We could add an unused > dependency to that, but in the end that's not cleaner than a new > service dedicated to the creation of initial resources. > Well, I would suggest to change the code to use the resource resolver - that's why we have the abstraction in the first place. As also pointed out, the correct solution is the resource capabilities model of OSGi - which is declarative by using manifest entries and does not require any artifical service. Carsten > > As Stefan says, the Sling node types need to be registered before > those initial resources are created, so there's a bit more to it. > > -Bertrand > -- Carsten Ziegeler Adobe Research Switzerland cziege...@apache.org