Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JavaMail - Exclusive access to Pop3

Reply
Thread Tools

JavaMail - Exclusive access to Pop3

 
 
Vijay
Guest
Posts: n/a
 
      05-11-2005
hi all,

I am using javamail to fetch messages from a pop3 server. I open my
session in read-write mode as I delete the messages when I close the
session.
Is it possible to make sure that when I am fetching a message from the
server, another similar copy of my same program would not be able to
access the Inbox?
I want that any other code(which tries to open in read-write mode)
should wait while I have a session open in read-write mode with the
pop3 server.

Thanks for any help...

 
Reply With Quote
 
 
 
 
Daniel
Guest
Posts: n/a
 
      05-13-2005
hi,
To my knowledge pop3 does not have this kind of feature (but I must
admit that my knowledge of pop3 is very limited). So that means that
your code would have to do this kind of checking itself. The only way
I can think of right away would be to create a "lock file" on the
computer, and then at startup check if this lock file is present. (I
know Eudora works this way) if the file is present, present a message
to the user, and then abort startup. Of course, when your program
closes it deletes the file.
Of course, if someone starts an e-mail client on another computer, you
won't know about it.

regards
Daniel


>hi all,
>
>I am using javamail to fetch messages from a pop3 server. I open my
>session in read-write mode as I delete the messages when I close the
>session.
>Is it possible to make sure that when I am fetching a message from the
>server, another similar copy of my same program would not be able to
>access the Inbox?
>I want that any other code(which tries to open in read-write mode)
>should wait while I have a session open in read-write mode with the
>pop3 server.
>
>Thanks for any help...


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with reading the contents, from and to adresses while using javamail pop3 Nikhil Java 4 04-15-2007 06:11 PM
JAVAMAIL POP3 - Secure Password Authentication cipher Java 2 02-14-2006 09:55 AM
Example of Javamail with SMTP and POP3 on SSL Charter Java 2 09-20-2005 04:36 AM
Javamail example with POP3 and SMTP on SSL Adam Messer Java 0 09-20-2005 01:04 AM
JavaMail POP3 folder.close() method close also store! Daniel Albisser Java 1 04-07-2004 03:45 PM



Advertisments