JavaMail - Exclusive access to Pop3

V

Vijay

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...
 
D

Daniel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top