Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-889

'Reimport' doesn't invalidate LRUPomModelCache

    XMLWordPrintable

Details

    • Hide

      1. Deploy a dependency jar to Nexus (say, mypojo-1.0.1-SNAPSHOT.jar)
      2. Create a project in business-central
      3. Configure project dependency in business-central
      4. Write a DRL.
      5. Build&Deploy
      -> OK
      6. Update a class in the dependency jar by adding a field
      7. Deploy the new SNAPSHOT jar to Nexus
      8. Press "Reimport" in "Dependencies" view
      9. Write a DRL with used the new field.
      10. Build&Deploy
      -> Error

      Show
      1. Deploy a dependency jar to Nexus (say, mypojo-1.0.1-SNAPSHOT.jar) 2. Create a project in business-central 3. Configure project dependency in business-central 4. Write a DRL. 5. Build&Deploy -> OK 6. Update a class in the dependency jar by adding a field 7. Deploy the new SNAPSHOT jar to Nexus 8. Press "Reimport" in "Dependencies" view 9. Write a DRL with used the new field. 10. Build&Deploy -> Error
    • Workaround Exists
    • Hide

      on the Project Editor screen amend the Project's description and save. This will raise a InvalidateDMOProjectCacheEvent containing the path to the pom.xml and the LRUPomModelCache will be cleared.

      Show
      on the Project Editor screen amend the Project's description and save. This will raise a InvalidateDMOProjectCacheEvent containing the path to the pom.xml and the LRUPomModelCache will be cleared.
    • NEW
    • NEW

    Description

      "Reimport" button in "Dependencies" view doesn't invalidate cache.

      Mike wrote:

      The "reimport" looks to be incompatible with it's true intention - to invalidate ALL caches.
      
      org.guvnor.common.services.project.backend.server.AbstractProjectService.reImport(..) is raising a InvalidateDMOProjectCacheEvent containing the Project ROOT path.
      
      However LRUPomModelCache.invalidateProjectCache(..) is checking if the path is that for the pom.xml.. and hence in your scenario "re-import" is not working.
      
      There is a workaround; on the Project Editor screen amend the Project's description and save. This will raise a InvalidateDMOProjectCacheEvent containing the path to the pom.xml and the LRUPomModelCache will be cleared.
      
      Please also raise a JIRA requesting LRUPomModelCache.invalidateProjectCache(..) is updated to use the Project' in the event and not the path.
      

      Attachments

        Issue Links

          Activity

            People

              manstis@redhat.com Michael Anstis
              manstis@redhat.com Michael Anstis
              Jan Hrcek Jan Hrcek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: