Hide Forgot
Date of First Response: 2008-08-20 11:48:01 project_key: SOA The file changes are made in this way 1) Make a copy of file (.orig) 2) Copy the copied file to the orginal one and replace the requested string SOA-567 - it prevents the .orig file to be overwirtten. It means now that if there are multiple calls to reconfigure than only the last change on the file is preserved because we are still operation on the original file. To fix the problem the chnge should be rolled back thus change <copy file="@{file}" tofile="@{file}.orig" overwrite="false"/> <copy file="@{file}.orig" tofile="@{file}" overwrite="true"> to <copy file="@{file}" tofile="@{file}.orig" overwrite="true"/> <copy file="@{file}.orig" tofile="@{file}" overwrite="true">
Link: Added: This issue is related to SOA-567
Link: Added: This issue is related to SOA-512
It looks like there are further potential problems with this tool. The file: .../deploy/jboss-messaging.sar/jms-ds.xml is copied with overwrite="false", so will only be copied the first time the tool is run. The file: .../eploy/jbpm.esb/hibernate.cfg.xml is assumed to have not been changed, so the reconfiguration will fail the second time the tool is run (and subsequent times).
Revision 1713 of build-tools/resource/schema/tool/esb/build.xml should fix the original problem. Log message: Allow multiple reconfigure macros to be applied to the same file. Should fix the original problem in SOA-695.
If there's a need to apply more reconfigurations to the same file, I suggest this approach: 1. Only at the beginning of the reconfiguration process <copy file="@{file}" tofile="@{file}.orig" overwrite="false"/> <copy file="@{file}.orig" tofile="@{file}.work" overwrite="true"> 2. For each reconfiguration step <copy file="@{file}" tofile="@{file}.work" overwrite="true"/> <copy file="@{file}.work" tofile="@{file}" overwrite="true"> - with applying filters here
After some experimentation and after reading the Ant manual at: http://ant.apache.org/manual/index.html the description of "overwrite" is: Overwrite existing files even if the destination files are newer. This means that even if overwrite="false" is set, then the file will be overwritten if the source file is new enough (it appears that ant ignores seconds when checking).
Fixed in revision 1771 of: build-tools/resource/schema/tool/esb/build.xml Log message: Backup all files from the original deploy that we modify once only. Should fix JIRA SOA-695.
Verified in IR4
Link: Added: This issue is related to SOA-853
Link: Added: This issue is related to SOA-860