Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Mail Monitoring

843830Oct 30 2006 — edited Nov 25 2006
I have an application that monitors incoming mail, parses messages, and then sends replies. A couple of things:

1. An instance of the app checks incoming mail every 10 seconds.
2. For redundancy, the app runs on two separate machines but checks the same POP3 account.

What is the best strategy for performing such mail monitoring? The monitor.java demo connects to the store, opens a folder, attaches a messageCountListener, and (without ever closing the store or folder) periodically calls folder.getMessageCount(). Is that the best way, or should I be opening and closing the connections each time I check for incoming mail? Or do I have other options?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2006
Added on Oct 30 2006
18 comments
71 views