On Sat, 24 Mar 2001, Glenn Nielsen wrote:
> Craig,
>
> I have another version of a MailSessionFactory (I thought I had mentioned
> I would take care of it). It is identical to what you just commited,
> with one exception.
>
Well, I must have missed your message about taking care of it (but it was
a good learning experience for me anyway). Once we get the Commons
project up and running, the in-memory naming context stuff might be a good
candidate for a shareable component, and I wanted to understand a bit more
about how it worked first.
> It uses getInstance() instead of getDefaultInstance(). getDefaultInstance()
> creates just one instance of a Session for the entire JVM which would be global
> to all web applications. With getInstance() you can configure different SMTP
>settings
> per web application.
>
That sounds like a *much* better idea. Go ahead and switch this this to
getInstance() if you want.
> I also have an updated version of the Factory which creates a MimePartDataSource
> which allows more generic configuration of SMTP settings like you did below.
>
It seems like a pretty good design pattern when the underlying factory
accepts an arbitrary set of properties.
> Regards,
>
> Glenn
>
Craig