1 Reply Latest reply on Apr 2, 2013 3:45 PM by Navdeep Sethi

    How to order Standard HTTP Filter as OSGI components

    Navdeep Sethi Level 1

      I have an issue where I would like to order 2 standard filters deployed as OSGI components on Adobe CQ5.5 - Apache Felix console - so that filter A should run first and filter B should run second in the sequence. Do you know if there is any OSGI or SCR property which can order 2 filters in sequence so that one should run after another?

       

      For example:

       

      Filter A

       

      @Component

      @Service @org.apache.felix.scr.annotations.Properties({

               @Property(name = "pattern", value = "/.*"),

              @Property(name = Constants.SERVICE_RANKING, intValue = 99999, propertyPrivate = false)

      })

      public class FilterA implements implements javax.servlet.Filter  { }

       

      FilterB

       

      @Component

      @Service @org.apache.felix.scr.annotations.Properties({

              @Property(name = "pattern", value = "/.*"),

              @Property(name = Constants.SERVICE_RANKING, intValue = 100000, propertyPrivate = false)

      })

      public class FilterB implements implements javax.servlet.Filter  { }

       

      I would like to run FilterA first and then FilterB. If I deploy the above filters as OSGI bundle on CQ5.5 then I only see FilterB is registered on the HTTP White board console. I do not see FilterA being even registered on Http White board or being invoked in request flow. Thanks.