Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4587

LocalizedTextUtil not caching negative ResourceBundle.getBundle results

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.24
    • 2.3.28, 2.5
    • Core Actions
    • None

    Description

      I have a few websites running under a single Tomcat packaged as separate war files. Recently, I have started to run into issues with thread starvation, which seems to stem from Struts 2. Specifically, calls to ResourceBundle.getBundle via LocalizedTextUtil.findResourceBundle end up contending on the lock for WebAppClassLoader.

      When testing things locally, it looks like the findResourceBundle is called numerous times for each <s:text> tag, with various bundle names being tried, many resulting in a MissingResourceException which does not get cached.

      I will attach a couple of thread dumps that exemplify the situation.

      If you suspect this is caused by something I am doing wrong on my end, please do let me know!

      Attachments

        1. struts2_issue.jstack2
          5.20 MB
          Lauri Lehtinen
        2. struts2_issue.jstack1
          4.68 MB
          Lauri Lehtinen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lehtinen Lauri Lehtinen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: