git://source.jalview.org
/
vamsas.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated test cases for spring 2006 schema, and major debug of locking system
[vamsas.git]
/
src
/
org
/
vamsas
/
client
/
simpleclient
/
VamsasSession.java
diff --git
a/src/org/vamsas/client/simpleclient/VamsasSession.java
b/src/org/vamsas/client/simpleclient/VamsasSession.java
index
887ca91
..
a5359ad
100644
(file)
--- a/
src/org/vamsas/client/simpleclient/VamsasSession.java
+++ b/
src/org/vamsas/client/simpleclient/VamsasSession.java
@@
-5,6
+5,7
@@
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
+import java.io.RandomAccessFile;
import java.io.Writer;
import org.apache.commons.logging.Log;
import java.io.Writer;
import org.apache.commons.logging.Log;
@@
-237,9
+238,10
@@
public class VamsasSession {
SessionFile sfw = new SessionFile(new File(sessionDir, CLOSEANDSAVE_FILE));
while (!sfw.lockFile())
log.debug("Trying to get lock for "+CLOSEANDSAVE_FILE);
SessionFile sfw = new SessionFile(new File(sessionDir, CLOSEANDSAVE_FILE));
while (!sfw.lockFile())
log.debug("Trying to get lock for "+CLOSEANDSAVE_FILE);
- sfw.fileLock.rafile.setLength(0); // wipe out any old info.
+ RandomAccessFile sfwfile=sfw.fileLock.getRaFile();
+ sfwfile.setLength(0); // wipe out any old info.
// TODO: rationalise what gets written to this file (ie do we want other clients to read the id of the requestor?)
// TODO: rationalise what gets written to this file (ie do we want other clients to read the id of the requestor?)
- sfw.fileLock.rafile.writeUTF(client.getClientUrn()+":"+user.getFullName()+"@"+user.getOrganization());
+ sfwfile.writeUTF(client.getClientUrn()+":"+user.getFullName()+"@"+user.getOrganization());
sfw.unlockFile();
if (store_doc_file!=null)
store_doc_file.setState();
sfw.unlockFile();
if (store_doc_file!=null)
store_doc_file.setState();