Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-53

"Reimport" doesn't invalidate cache

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0
    • 6.x.x
    • Decision Central
      • with Nexus
    • DR1
    • 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.
    • 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

      "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.
      

              manstis@redhat.com Michael Anstis
              rhn-support-tkobayas Toshiya Kobayashi
              Jan Hrcek Jan Hrcek (Inactive)
              Jan Hrcek Jan Hrcek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: