From: jprocter Date: Tue, 20 Mar 2007 14:19:41 +0000 (+0000) Subject: pass maintained hash of Vobject hash values to IdFactory so it can detect modified... X-Git-Tag: Release_0.2~150 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=33e0f11ea3dec08c78b0f10a192bad779565c704;p=vamsas.git pass maintained hash of Vobject hash values to IdFactory so it can detect modified objects. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@370 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java b/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java index de2e00d..dc3df20 100644 --- a/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java +++ b/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java @@ -61,7 +61,9 @@ public class SimpleClient implements IClient { * @return */ private IdFactory makeVorbaIdFactory() { - return new IdFactory(getSessionHandle(), client, user); + if (extantobjects==null) + extantobjects=new Hashtable(); + return new IdFactory(getSessionHandle(), client, user, extantobjects); } /** @@ -316,12 +318,14 @@ public class SimpleClient implements IClient { log.debug("updateDocument for "+session.getSessionUrn()+" with unmodified IClientDocument (skipping the write)"); } else { try { - if (!cdocument.updateSessionDocument()) { + boolean updated=cdocument.updateSessionDocument(); + if (!updated) { log.warn("Session document did not update properly for session directory "+_session.sessionDir); // cdocument.archive.cancelArchive(); // LATER: could be done - would need to prevent updateSessionDocument closing the iohandler. _session.slog.warn("Session Document updated but may not be valid (false return from org.vamsas.simpleclient.ClientDocument.updateSessionDocument()"); + } else { + log.debug("Document update successful."); } - log.debug("Document update successful."); _session.setUnsavedFlag(); } catch (IOException e) {