Am Freitag, den 05.10.2007, 17:14 +0200 schrieb Carsten Ziegeler: > > What do you think ? If feedback is positive, I would also include this > > in the Sling API proposal (SLING-28). > > > I'm not sure - it definitly makes repository based components much > easier, but draws in some stuff into the (now simple) sling api and the > core. As ContentManager does not have any further dependencies this > seems to be ok.
That is the point: The ContentManager makes no actual references to any concrete storage, it is only its (currently only one) extension JcrContentManager which brings in the JCR Repository. But this would remain in the content bundle. > > So I'm +0 on this :) > > I'm wondering if it is sufficient to have a single content manager in > the application? Or could it be that some components might use a > different content manager than others? For example some components > writing/reading from one workspace or others doing it with another > workspace? Well having the getContentManager method would allow for ComponentRequestWrapper implementations to overwrite this method and return a different ContentManager while still allowing access to the original one by just unwrapping and wrapped requests. This is not as easy with the request attribute based solution. On the other hand, nobody is hindered to get the JcrContentManagerFactory service and acquire a different JcrContentManager for specific use cases. Regards Felix