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!

Serious javamail problem? socketRead0

843830Jul 9 2007 — edited Jul 9 2007
Let's imagine such experiment:
1. we have java-program, which receives mail from some POP3 server.
this program simple uses something like this:
                ....
                msgs = folder.getMessages(1,1);
                folder.fetch(msgs, fp);
                ....
2. Let's imagine, that our test POP3 server has bug: in some moment, when our java-mail-client sends him command "RETR" or "TOP", mail-server becomes non-repsonsible, I mean it begins do something, like this:
                            do {
                                if (Thread.interrupted()) break;
                            } while (true);
So, the problem is, that in this case our javamail client becomes also non-responsible, non-interruptable and so on.

Researches show, that problem is in native java-method: socketRead0 (in class SocketInputStream), which is blocking, non-interruptable method. This method is used by javamail classes for operate with sockets.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2007
Added on Jul 9 2007
1 comment
104 views