closed sockets

Thufir <[email protected]> Mon, 02 Apr 2012 18:15:36 -0700
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
A Facelets backing bean uses the following utility class for NNTP 
operations:

https://gist.github.com/2288307

Which works fine provided that the connection is left open, that the 
folder and store are not closed.  However, is it not good practice to 
close the folder and store when done?

So, I've tried adding some booleans, but am otherwise at a loss as to 
how correctly deal with NNTP connections to leafnode on localhost.

Is there a better approach?  What happens is that Facelets makes a 
number of beans, each of which use the above utility class which, in 
turn, hammers leafnode resulting in:

javax.el.ELException: /foo/client.xhtml @11,74 
value="#{messageBean.messages}": javax.mail.MessagingException: Socket 
closed;
   nested exception is:
     java.net.SocketException: Socket closed




thanks,

Thufir