On 3/17/10 7:05 AM, Alexander Klimetschek wrote: > The question for one workspace per account / user / etc. pops up every > now and then on the jackrabbit mailing lists and the general answer is > to try to stay away from that as it just complicates things: why > having to work with multiple workspaces when you can just create > separate nodes? Workspaces are technically meant for > branching/cloning/merging in the JCR spec. Let's assume for the sake of argument that there are cases where using multiple workspaces is valid. Like everything, they can be abused.
> Hence support for multiple workspaces in Sling should IMHO not change > URL resolution at all (workspace as part of URLs) and should default > to expecting a single workspace (as now). If people want to use > multiple workspaces, tinkering would be required and they should be > able to plug in different resource resolvers / authentication > mechanisms that might select a different workspace for each request > depending on some request headers etc. But this should not be a > primary feature and shouldn't lead to complication of the Sling > architecture, I think. In general, this works... But script resolution is different because it uses a separate session. So today, you can write a minimal amount of code to switch workspaces based on a request header. This isn't in the core. However, even if you do this, scripts are still resolved from the default workspace. Fundamentally, all I'm suggesting is that scripts should be resolved using the same workspace as that which was used to do the resource resolution. This is all internal to the servlet resolver, so it doesn't really complicate the architecture (in fact, it's a ongoing testament to the elegance of Sling's architecture that this change is contained to a single bundle) Justin > > Just my 2 euro-cents... > > Regards, > Alex > > On Wed, Mar 17, 2010 at 10:11, Carsten Ziegeler <cziege...@apache.org> wrote: >> Bertrand Delacretaz wrote >>> Hi, >>> >>> On Wed, Mar 17, 2010 at 9:41 AM, Carsten Ziegeler <cziege...@apache.org> >>> wrote: >>>> ...In general I am not sure if it should be the authentication which >>>> defines what workspace is used. I rather could picture having a resource >>>> tree where workspaces are mounted at different locations in the tree. >>>> The script resolution could then be configured to search in the various >>>> workspaces.... >>> >>> I agree that this seems more logical than authentication switching >>> workspaces - but not sure how to retrofit this, as IIUC the current >>> tree does not consider workspaces. >>> >> It's right that the current implementation does not support this - but this >> is something we have on our plate for a long time now and with the >> change to the resource resolver factory - we started recently - we are >> close to this. >> >> Carsten >> -- >> Carsten Ziegeler >> cziege...@apache.org > >