On Wed, Sep 16, 2009 at 12:58 PM, Norman Maurer <[email protected]> wrote:
> Hi Robert,
>
> I'm not getting it. could you provide some pseudo code or just go
> ahead and commit ? We can rollback later if it will not work out ;)

POP3 and SMTP both use a design whereby the ProtocolHandler is also
implements the session. each time that a new connection is made and
the handleProtocol method called, logically a new session begins and
local fields are set. i prefer a design whereby a new instance of a
session implementation is created each time. the IMAP bridge code uses
this design eg 
http://james.apache.org/server/head/xref/org/apache/james/imapserver/ImapHandler.html#115.
i think this is easier to follow since it's obvious when the session
is created and is destroyed without understanding the james sockets
foo. this would also allow those fields which are immutable for the
session to be marked final.

this would mean moving the session support from SMTPHandler into a
SMTPSessionImpl then injecting the required information on creation.

- robert

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

Reply via email to