Hi all,
Currently all javax.servlet.Filter services registered in the OSGi
framework is picked up by Sling (the SlingMainServlet) an added to the
Sling filter chains.
This is problematic in general and in special with respect to the
planned addition of white board support for real servlet container
filters (SLING-1223 [1]).
Incidentally we are also considering an extension to the Sling filter
support adding more filter scope values: SLING-1213 [2].
So I would like to propose the following:
* Sling is modified to only pick Filter services which have a
specific registration property set (say filter.scope or rather
a new property such as sling.filter.scope or
sling.filter.dispatcher). Likewise the current filter.order
property should be dropped and be replaced by the standard
OSGi service.ranking property.
* The intended whiteboard support (SLING-1223) also is based on
prerequisite properties (see [3]) and will only pick up filters
with the correct properties set.
* For backwards compatibility Sling still picks up all filters
but ignores those which contain any of the known white board
filter properties.
WDYT ?
Regards
Felix
[1] https://issues.apache.org/jira/browse/SLING-1223
[2] https://issues.apache.org/jira/browse/SLING-1213
[3]
http://felix.apache.org/site/apache-felix-http-service.html#ApacheFelixHttpService-UsingtheWhiteboard