How do I close down the Folder.list() connection?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   George_Lindholm
Posted On:   Thursday, March 13, 2003 12:08 PM

When I use the Folder.list() method to get the list of IMAP folders
available to me, I end up with an extra IMAP connection, that
for the most part appears to have no useful purpose, except to eat
up server resources.

How can I close down this extra connection?

Re: How do I close down the Folder.list() connection?

Posted By:   George_Lindholm  
Posted On:   Tuesday, March 18, 2003 03:10 PM

Let me rephrase my question.
How can I force the connection pooling in javamail to close
down unused connections?

Using this example:

Folder inbox = store.getDefaultFolder().getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
Folder trash = store.getDefaultFolder().getFolder("mail/Wastebasket");
if (!trash.exists()) {
System.err.println("Trash folder doesn't exist");
}


How do I get rid of the connection that was created by the
trash.exists() call?


George

About | Sitemap | Contact