Originally posted by P.W Mathias Nilsson:
renameTo() method only works if you write to the same hd volume. If you try to rename a file to a diffrent volume this wont work. renameTo is fast but not to recommend if you don't know if you want to rename a file and move it.
Added comments :
* Input and ouput directories remain on the same disk although it is NFS mounted , Is it affected for the above intermittancy ?
* code snippet
if (!srcFile.renameTo(dstFile))
{
logMsg = Log.logError(CATALOG_ID, 12, new Serializable[] {
new Long(jobInstanceId),
new Integer(taskOrder),
inputFileName,
outputFileName});
if (DEBUG) { System.out.println (logMsg); }
throw new TaskProcessFailureException(logMsg);
}
thx and regards,
gim