I'm pulling my hair out here... seems that there's something broken in Avalon, or 
something the POP3 server is calling on Avalong and breaking things (which shouldn't 
be possible).

The '.' issue is irrelevant at this point (although I still think we should change 
this at some point as usernames and folder names can both have '.'s in them).  There 
are 2 places in the code that I found are converting these, and the error doesn't seem 
to be related to this after further testing.  I've rolled back my version and am using 
what's right in CVS now.

Here's what it seems is happening.  When a message first arrives in a user's inbox, it 
gets saved as "XXXXXX.PersistentStore" and "XXXXXX.StreamStore" (in the appropriate 
folder).  Then the user reads the message and possibly marks it as deleted (although 
I'm not exactly sure what this user's client is doing).  When I look again, the only 
file is named "XXXXXX.StreamStore" (there's no more XXXXXX.PersistentStore" and the 
mailbox is now broken... you can't open it anymore because it says it gives an error 
in netfile.log saying it can't find the "XXXXXX.PersistentStore" file.  What gives?

I've looked through all the JAMES code and can't find any references to 
PersistentStore or StreamStore (or even anything that would suggest how you save as 
one or another), so I'm at a loss.

Anyway, that's the precursor to all this, and perhaps someone else more familiar with 
the code can point to the problem.  I think I can state in a nutshell that when the 
MailRepository.remove was called, only the PersistentStore successfully deleted, and 
not the StreamStore.  If we can accept this, I can state that when I first wrote JAMES 
(the code I submitted long long before Avalon and anything else well designed), I 
noticed that on NT, you had to wait a few milliseconds before a file was deleted.  In 
other words, if you did this:

myfile.delete();
System.out.println(myfile.exists());

you would see "true".  What I did to counter this was to loop, e.g., 

myfile.delete();
while (myfile.exists()) {
    Thread.currentThread.sleep(100);
}

This would enforce file deletions.  Note that linux doesn't seem to have this problem.

That's one fix, although I have no idea what branch in Avalon to apply this to.  
Second, I would say that in MailRepository, if there exists a StreamStore file but no 
PersistentStore file, it should delete the StreamStore file (as the persistent data is 
useless without it).

Any pointers on where to go from here?

Serge Knystautas
Loki Technologies
http://www.lokitech.com/


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to