Unable to delete EBA file if the value of defaultUseCaches is set to false on
JarURLConnection on a separate thread during installation
---------------------------------------------------------------------------------------------------------------------------------------
Key: ARIES-804
URL: https://issues.apache.org/jira/browse/ARIES-804
Project: Aries
Issue Type: Bug
Components: Application
Affects Versions: parent-0.4.0
Environment: Windows 7
Reporter: Iain Duncan
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()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira