Hi Ian, Ian Boston schrieb: > Hi, > > I don't know if this is intentional, but it looks like its not possible > to register more than one ResourceProvider at /, and so its not possible > to bind a ResourceProvider to a node (anywhere in the content system) > with a specific resource type. > > Is this intentional or a mistake ?
The current design and intention is, that for any one (root) path there may only be one resource provider registered. So for example, for a (root) path "/some/path", there may only one. Of course there may be another one at "/some" or at "/some/path/below". As a consequence, there may only be one resource provider for "/" and this currently is the JcrResourceProvider, which is hard-coded (currently). There is a concept to change the situation with the hard-coded JcrResourceProvider at "/" [1]. But there is no concrete concept or idea yet to allow more than one resource provider fro the exact same (root) path. Hope this helps. Regards Felix [1] http://cwiki.apache.org/SLING/add-resourceresolverfactory-service-interface.html > > > <Explanation> > > The root ResourceProviderEntry, accepts a registration of a provider > registered with /, however all paths as assumed to be relative and so > have the leading / removed, hence the ResourceProvider with a prefix of > / will never match anything, as the path will have already had the > leading / removed. > > eg resolving /home/ieb/messagestore/1231231 results in a test against > the default ResourceProviderEntry, the leading / is removed (eg > home/ieb/messagestore/1231231) which does not match the contained > ResourceEntryProvider with a prefix of / > > </Explanation> > > > Checking if the prefix was / before assuming the path is relative would > probably fix the problem. > > WDYT ? > Ian > > >