+
+ /**
+ * write the cdocument instance to the session for real.
+ */
+ private void writeSessionDocument() {
+ try {
+ 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.");
+ }
+ _session.setUnsavedFlag();
+ }
+ catch (IOException e) {
+ log.warn("IO Problems when updating document!",e);
+ _session.slog.error("IO problems when attempting to update document.");
+ }
+ }
+