Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-804

Unable to delete EBA file if the value of defaultUseCaches is set to false on JarURLConnection on a separate thread during installation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • parent-0.4.0
    • None
    • Application
    • None
    • Windows 7

    Description

      If you install an EBA into Aries but at the same time a different thread that sets the value of defaultUseCaches to false then the EBA cannot be deleted on Windows.

      I think this is related to the fix to #ARIES-292. Here after installing the application it runs through getting the JAR file for the EBA and closing the file. If the use caches is set to true at this point then it will get the same JAR file that was used earlier in the installation process and close it. However, if use caches is set to false it will create a new JAR file and close that thus leaving the one that was opened during the installation open.

      There is a timing element to this because if default use caches is false throughout then it won't keep a handle open to the file in the first place and if it is true throughout then the fix to 292 works. It is only when the value changes from true to false on a separate thread between the installation of the EBA and the tidy up that was added for 292.

      I think this will have a simple fix by adding:

      urlc.setUseCaches(true);

      before getting the JAR file in AriesApplicationManagerImpl.install()

      Attachments

        1. JarLockingInApp804.patch
          0.9 kB
          Iain Duncan

        Activity

          People

            not Alasdair Nottingham
            iainduncani Iain Duncan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: