protected boolean copyAgentAppWarFile(IStateAccess stateAccess) { boolean status = false; String srcDir = ConfigUtil.getEtcDirPath(); String destDir = (String) stateAccess.get(STR_KEY_JETTY_INST_DEPLOY_DIR); try { FileUtils.copyJarFile(srcDir, destDir, STR_AGENT_APP_WAR_FILE); Debug.log( "ConfigureAgentAppTask.copyAgentAppWarFile() - copy " + STR_AGENT_APP_WAR_FILE + " from " + srcDir + " to " + destDir); status = true; } catch (Exception e) { Debug.log( "ConfigureAgentAppTask." + "copyAgentAppWarFile() - Error occured while copying " + STR_AGENT_APP_WAR_FILE + " from " + srcDir + " to " + destDir, e); } return status; }
/** * Backup the old product home directory before migration. * * @throws InstallException */ protected void backupProductHome() throws InstallException { String locatorFile = getProductLocatorFile(); try { FileUtils.backupFile(locatorFile, STR_BACK_UP_FILE_SUFFIX); saveProductHome(); } catch (Exception e) { Debug.log( "MigrateServerLocatorHandler - Error occurred " + "while backup and deletion for file: '" + locatorFile + "'."); Object[] args = {locatorFile}; throw new InstallException(LocalizedMessage.get(LOC_DR_ERR_PRODUCT_LOCATOR_BACKUP, args)); } }