> From: Conal Tuohy [mailto:[EMAIL PROTECTED]]
> 
> Justin wrote:
...
> > Most mail systems won't
> > make a new connection to the server to retrieve each
> > individual message.
> > They usually download them all at once into a local store. Will
> > the source be responsible for this? If you're just concerned with 
> > viewing
> 
> I don't think the Source should do this: storing messages is what a 
> mail server (or any JavaMail "provider") is for after all. I don't 
> want to write a mail server. ;-)
> 
> > messages and don't want to store them, then you might want to
> > keep the
> > connection open so you don't have to reconnect for each
> > message. In this
> > case you'd want to store the JavaMail connection in the
> > session, and I'm
> > not aware the a source has access to the session.
> 
> You're right - keeping a cache of connections is important (though not

> such an issue if the mail server is local) - but I'm still thinking 
> this can be done with a Source. I'm still not entirely clear about 
> the Source's relationship with the rest of Cocoon (including the 
> session), but in any case, it seems to me that a Source can keep a 
> cache of open Connections itself if necessary - it doesn't really have
> to be stored in the Session.

You can do this (connection pooling) in MailSourceFactory, or, if such
connection pool can be reused somewhere else, it could be a separate
connection pool component (a-la datasource).

Vadim

...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to