Leif Mortenson wrote:
The problem that I am running into is that the SMTPTargetFactory looks for a
JavaMail Session instance in the context of the factory. Tracing back
through the
code, this context appears to be the root context which is passed to the
DefaultContainerManager constructor when starting up Fortress.

yep, IIRC fortress by default uses a global context.

That Context object is obtained by calling getContext on my FortressConfig
instance, and is thus read only.

IIRC if you keep a reference to the DefaultContext that is passed in during configuration of the container you can change values later and the new components will get those new values. If not I think that's how its supposed to be. Of course, changing a component's context after the container startup is usually not a good thing!


I was also wondering why the SMTPTargetFactory simply does not allow you
to specify the SMTP host in its configuration. If that was possible,
then it would
be easy to completely self contain the configuration information for
sending the
log events.

not knowing the answer, I can see the reasoning. JavaMail sessions are often globally configured and shared between apps on the same machine, IIRC, which makes sense. I think there's some static getDefaultSession or something like that to use...


- LSD


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Apache Excalibur Project -- URL: http://excalibur.apache.org/



Reply via email to