Hi, Am Donnerstag, den 28.02.2008, 08:23 +0100 schrieb Carsten Ziegeler: > Felix Meschberger wrote: > > Hi, > > > > Am Mittwoch, den 27.02.2008, 23:12 +0100 schrieb Bertrand Delacretaz: > >> On Wed, Feb 27, 2008 at 8:16 PM, Felix Meschberger > >> <[EMAIL PROTECTED]> wrote: > >> > >>> ... I think, we can safely define this reference optional as in: > >>> > >>> @scr.reference cardinality="0..1" policy="dynamic"... > >> It's probably ok in this case, but please, if someone implements this, > >> make sure to add clear log messages or exceptions that show when this > >> service is missing. Problems with missing services can be a real pain > >> to troubleshoot. > > > > Well, the service is really only needed when uploading files and when > > the request does not provide an appropriate mime type for the file. In > > fact the service, would not even be required, because the ServletContext > > could just as well be used.... (and the ServletContext provided to > > servlets in Sling in turn goes back to the MimeTypeService). > > > :) > > I agree that we either should make the reference dynamic or use the > servlet context. I would opt for using the servlet context. > > I'll make the changes today.
I created SLING-286 for this and already have the implementation, but not committed yet, as I also have the move of the launchpad/lauchpad-servlets module to sling/ujax on the platter... Regards Felix
