Announcement Announcement Module
Collapse
No announcement yet.
Filters, ContextListeners and JRun Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Filters, ContextListeners and JRun

    I have simple test app that deploys flawlessly on Tomcat 4.0, but tanks on JRun. For each Acegi filter I get an IllegalStateException with the message that a WebApplicationContext wasn't found. Only after that does it show the WebApplicationContext being loaded successfully. So it appears that, for whatever reason, JRun is loading filters before context listeners. Any ideas on why this would be and what the workaround is? Is anyone out there using Acegi with JRun? Thx.

  • #2
    With JRun you need to specify

    Code:
    <init-param>
    <param-name>init</param-name>
    <param-value>lazy</param-value>
    </init-param>
    for each of your Acegi Security related filters. This will delay trying to load the proxied bean from the Spring application context until the first filter invocation.

    Comment


    • #3
      Worked. Thanks!

      Comment


      • #4
        Hmm...seem to be having the same problem re JRun with dispatcher-servlet.xml loading before applicationContext.xml. Reverting to the ContextLoaderServlet and setting load-on-startup seems to solve the problems. Is that the recommended approach? Thx.

        Comment


        • #5
          There is no problem with using the ContextLoaderServlet and lazy loading of the filters if you need to.

          Comment

          Working...
          X