From: jprocter Date: Tue, 29 Nov 2005 16:21:37 +0000 (+0000) Subject: small updates. X-Git-Tag: Release_0.2~421 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=22f2540fb101614e50bbbd7369e968f665d64b3b;p=vamsas.git small updates. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@99 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/client/simpleclient/SessionFile.java b/src/org/vamsas/client/simpleclient/SessionFile.java index e7b450f..b73a47f 100644 --- a/src/org/vamsas/client/simpleclient/SessionFile.java +++ b/src/org/vamsas/client/simpleclient/SessionFile.java @@ -7,13 +7,12 @@ import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.impl.Log4jFactory; /** * Basic methods for classes handling locked IO on files * monitored by all (simpleclient) clients in a vamsas session. * @author jimp - * + *TODO: support non nio file locking capable systems */ public class SessionFile { private static Log log = LogFactory.getLog(SessionFile.class); diff --git a/src/org/vamsas/client/simpleclient/VamsasArchive.java b/src/org/vamsas/client/simpleclient/VamsasArchive.java index 8ef72f0..7b0532d 100644 --- a/src/org/vamsas/client/simpleclient/VamsasArchive.java +++ b/src/org/vamsas/client/simpleclient/VamsasArchive.java @@ -7,9 +7,7 @@ import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.util.Hashtable; -import java.util.Map; import java.util.jar.JarEntry; -import java.util.jar.JarInputStream; import java.util.jar.JarOutputStream; import org.apache.commons.logging.Log; @@ -113,6 +111,12 @@ public class VamsasArchive { if (!archive.getAbsolutePath().equals(original)) { if (originalBackup==null) makeBackup(); + try { + odoclock.updateFrom(null, rchive); + } + catch (IOException e) { + log.error("Problem updating archive from temporary file!",e); + } } } else { archive.renameTo(original); @@ -376,6 +380,7 @@ public class VamsasArchive { if (!isDocumentWritten()) log.warn("Premature closure of archive '"+archive.getAbsolutePath()+"': No document has been written."); newarchive.close(); + updateOriginal(); closeAndReset(); } else { log.warn("Attempt to close archive that has not been opened for writing.");