Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5492

WebApplication ignores a SecurityException when reading the configuration type

    XMLWordPrintableJSON

Details

    Description

      The WebApplication class has a piece of code in the method getConfigurationType(), that ignores a SecurityException.

      Code snippet:
      try

      { result = System.getProperty("wicket." + Application.CONFIGURATION); }

      catch (SecurityException e)

      { // Ignore - we're not allowed to read system properties. }

      This apparently causes a performance problem at one of our customers, where they had shared classloading enabled.

      Permissions were set differently on shared classloader level, which caused the retrieval of the property to fail silently, while taking about 10ms longer. This code is called everytime Component.getMarkupId is called, which means with 300+ components on a page, you get a delay of 3 seconds or more.

      Ofcourse the problem can be (and has been) solved with a correct configuration. My request however is that the exception is atleast logged at some level (warning for example), so spotting the problem will become a lot easier (it took us 2 weeks to narrow it down).

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            a.zwaan Arjan Zwaan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified