Velocity
  1. Velocity
  2. VELOCITY-541

only possible to use one StringResourceLoader per application

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None

      Description

      When multiple StringResourceLoaders are initialized, the later ones are blowing up. StringResourceLoader uses a static RepositoryFactory. Unfortunately, this means that you can really only have one StringResourceLoader per classloader. This poses significant issues for anyone using multiple engines w/StringResourceLoader and could be come a major issue if any other frameworks or components adopt use of the StringResourceLoader (e.g. i'm planning to use this for a VelocityViewTag in Tools 2.x). They'll stomp all over each other in many ways. This is bad.

        Activity

        Hide
        Nathan Bubna added a comment -

        revision 532549:

        Show
        Nathan Bubna added a comment - revision 532549:
        Hide
        Nathan Bubna added a comment -

        I meant to add this info in my resolving comment....

        Checked in change to revision 532549 to:

        Completely revamp how repositories are created and stored to allow for
        1) multiple StringResourceLoaders per application
        2) StringResourceRepository(s) to be stored statically or in application attributes
        3) named StringResourceRepository(s) to avoid namespace collisions
        4) ability to clear out static repositories to plug possible memory leak

        The existing StringResourceLoaderTestCase passes without alteration, and a new set of tests for the repository changes was added as StringResourceLoaderRepositoryTestCase.

        Show
        Nathan Bubna added a comment - I meant to add this info in my resolving comment.... Checked in change to revision 532549 to: Completely revamp how repositories are created and stored to allow for 1) multiple StringResourceLoaders per application 2) StringResourceRepository(s) to be stored statically or in application attributes 3) named StringResourceRepository(s) to avoid namespace collisions 4) ability to clear out static repositories to plug possible memory leak The existing StringResourceLoaderTestCase passes without alteration, and a new set of tests for the repository changes was added as StringResourceLoaderRepositoryTestCase.

          People

          • Assignee:
            Nathan Bubna
            Reporter:
            Nathan Bubna
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development