On Wed, 04 Apr 2012 15:25:37 -0700, markspace wrote:
> On 4/3/2012 5:27 PM, email@example.com wrote:
>> However, let me run this by you, please. The connection to leafnode on
>> localhost can just be left open, then I can omit the @Entity class and
>> just go from the gnu Message to MessageBean (and a facelet) directly.
> This I can't even parse. What kind of connection? What is leafnode? Is
> it a server? Something else?
eternal-september.org is interesting, never knew about them. Leafnode is
a lightweight NNTP server which you can point at, for example, eternal-
september, or multiple other servers of course. I only use two, my ISP
and gmane. However, I think I'll add eternal september. They have a
nice FQDN registration! Anyhow, back to Java...
Part of the rationale for using Leafnode was to make things speedier by
having all the pieces on localhost.
I'm not sure on the internal workings of Leafnode, I'll have to look into
it. However, it presumably only allows a small number of connections.
Apparently one option is to just leave the socket open. If the socket is
open, then the need for an @Entity wrapper/container for NNTP messages is
obviated. It's then possible to go straight from gnu NNTPMessage to a
@Named backing bean.
However, it's not totally reliable, because maybe leafnode will drop
connections unexpectedly, or something else might happen, and the
connection will be dropped. Maybe timeout, etc.
So, I will have to read the GNU API, but I was thinking of just sending,
say twenty messages at a time instead of the entire group. Just not
quite sure how get the facelet to then say "ok, get next message" and
handle the error messaging.
It's more complex in some ways then using an @Entity, but somewhat
preferable because it leaves all the messages on leafnode without
duplicating them. Although I suppose I'll want to add some flags like
"message read" or things along those lines, and will have to put those in
Hopefully that's clearer! It's not clear to me, just thinking out loud.