Jason wrote:
> The trouble is, I think this should be done on a case-by-case basis :(
> I do like the idea though. It would make catching common errors very
> easy, by just binding a default handler to most containers.
Yeah, I think JavaMail intends this to be used case-by-case to notify the
message itself of the events it cares about which affect its own situation,
however if we're serialising the messages themselves we still need to be
able to process the events, in extreme cases possibly days after the
listener was attached.
It would be twigs-in-the-beard-insane if this meant we retained those
objects in memory all that time :-)
My only initial solution to this is to delegate all the listening to the
container in some way, the container could then decide whether or not it
needs to load the message and call it's specific handlers, or if some other
action is more appropriate.
Unfortunately this would also fall down if the container was listening for
events related to a load of messages and James was stopped, unless the
provider could serialise its list of listeners events occuring after a
re-start would not be despatched.
Or perhaps it is possible to make JavaMail despatch every event directly to
the container regardless of whether or not a specific listener was
attached.
d.
***************************************************************************
The information in this e-mail is confidential and for use by the addressee(s) only.
If you are not the intended recipient (or responsible for delivery of the message to
the intended recipient) please notify us immediately on 0141 306 2050 and delete the
message from your computer. You may not copy or forward it or use or disclose its
contents to any other person. As Internet communications are capable of data
corruption Student Loans Company Limited does not accept any responsibility for
changes made to this message after it was sent. For this reason it may be
inappropriate to rely on advice or opinions contained in an e-mail without obtaining
written confirmation of it. Neither Student Loans Company Limited or the sender
accepts any liability or responsibility for viruses as it is your responsibility to
scan attachments (if any). Opinions and views expressed in this e-mail are those of
the sender and may not reflect the opinions and views of The Student Loans Company
Limited.
This footnote also confirms that this email message has been swept for the presence of
computer viruses.
**************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]