7 Replies Latest reply on Aug 2, 2007 7:29 AM by Pete Muir

    Disable built-In filter

    No No Newbie

      Hi,
      I'd like to disable one of the filters loaded by SeamFilter (the ExceptionFilter) , but couldn't figure how to do it.
      Could anyone give me a hint?

      Thx

        • 1. Re: Disable built-In filter
          Norman Richards Master

          There does seem to be a problem with this. I'm investigating why.

          • 2. Re: Disable built-In filter
            Dmitriy Lapko Newbie

            Did someone solve this problem? I need it to turn this filter off in tests to be able to see errors - when I start integration tests this filter catches all exceptions and the tool thinks that everything is ok, but it failed.

            • 3. Re: Disable built-In filter
              Shane Bryzak Master

              I'm pretty sure you can just set installed=false in components.xml to disable a filter.

              • 4. Re: Disable built-In filter
                Dmitriy Lapko Newbie

                Thank you for answer, but I spent an hour trying to do it and didn't succeed.

                I added into my components.xml next line:

                <component name="org.jboss.seam.web.exceptionFilter" installed="false"/>


                It didn't work:

                ...
                INFO 02-08 10:14:04,718 [org.jboss.seam.Component.<init>():239] Component: org.jboss.seam.web.exceptionFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.ExceptionFilter
                ...
                INFO 02-08 10:14:06,875 [org.jboss.seam.servlet.SeamFilter.init():95] Initializing filter: org.jboss.seam.web.exceptionFilter
                ...
                ERROR 02-08 10:14:08,656 [org.jboss.seam.web.ExceptionFilter.doFilter():68] handling uncaught exception
                ...


                I tried different combinations: with defining class and without, with setting precedence level and so on. It didn't work.

                I checked all examples from CVS - none has install="false" property for any built-in component.

                So, are you sure, that I can switch off built-in component like filter? If yes, can't you post an example or link, how to do it?



                • 5. Re: Disable built-In filter
                  Pete Muir Master

                  No, installed=false doesn't work. The only way to do this is to create a higher precedence component than the filter to disable, and override all its methods (eww, ugly!)

                  • 6. Re: Disable built-In filter
                    Dmitriy Lapko Newbie

                    Then last question - what can be higher precedence component then built-in precedence component like this ExceptionFilter? I think nothing, so it just at all impossible to do anything with it... Isn't it an issue for JIRA?

                    • 7. Re: Disable built-In filter
                      Pete Muir Master

                      Everything is higher precedence than builtin.

                      Gavin and I have discussed how to best deal with disabling built in components. The last JIRA issue got closed as rejected but feel free to open another.