Hi It was noted that the Sling Engine's handling of Filter service ordering is wrong with respect to the documentation: Documentation [1] states that Filter services with a higher service.ranking value have higher priorit than Filter services with a lower service.ranking value and thus the former are called before the latter. This is also in-line with the OSGi Code specification for the service.ranking service property in OSGi frameworks.
Unfortunately the implementation in the Sling Engine ServletFilterManager class is the other way around: Filters with lower service.ranking values are called before filters with higher service.ranking values. We basically have two options: (1) Keep the implementation and fix the documentation. This would allow us to keep the implementation and maintain backwards compatibility at the expense of not following the OSGi spec with respect to the service.ranking property (2) Fix the implementation and keep the documentation. This would allow us to keep following the specified intent for the service.ranking property at the expense of backwards compatibility with existing Filter services leveraging the service.ranking property. This is also reported as SLING-2920[2]. Question is: What shall we do ? Regards Felix [1] http://sling.apache.org/documentation/the-sling-engine/filters.html [2] https://issues.apache.org/jira/browse/SLING-2920
