Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4344647

PropertyResourceBundle is unusable for the i18n of a web application

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta2
    • generic
    • generic



      Name: skT45625 Date: 06/09/2000


      java version "1.2.2"
      Classic VM (build JDK-1.2.2_005, native threads, symcjit)

      Java.util.PropertyResourceBundle is implemented using a Hashtable for caching
      the properties, and therefore the method getObject() is synchronized.

      The problem with this synchronized method in a web application is that there
      are around a hundred threads that share the same bundle, and call getSring()
      about a hundred times per page. All those calls need to wait in line for that
      resource.

      There is actually no need for that method to be synchronized because the
      propertyResourceBundle is immutable (Once the property file is loaded, the
      bundle cannot be changed).

      In a web application the short response time is crucial, and therefor,
      PropertyResourceBundle is useless for its internationalization.
      (Review ID: 105928)
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: