cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Watson" <c.wat...@zen.co.uk>
Subject RE: sendmail xsl problem - singleton mail session?
Date Tue, 23 Apr 2002 11:26:27 GMT
Hello,

I've played with sendmail.xsl a bit recently.
I notice that it uses
javax.mail.Session.getDefaultInstance

I had trouble getting this one to change mail hosts via the parameter:
subsequent messages continued to use the host I'd used in the first message

I haven't delved into javax.mail far enough to be sure,
but my guess from the behaviour is that getDefaultInstance sets up a
Singleton session.

To get round the not-changing-mailhosts problem
I did myself a clone of sendmail.xsl but using
javax.mail.Session.getInstance instead of
javax.mail.Session.getDefaultInstance
and whacked into
\WEB-INF\classes\org\apache\cocoon\components\language\markup\xsp\java

and now I can use different hosts at will

I'm wondering whether it might be a useful improvement to have a parameter
to decide between

javax.mail.Session.getDefaultInstance and javax.mail.Session.getInstance

Hope this is of use to someone

Christopher Watson
> -----Original Message-----
> From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de]
> Sent: 23 April 2002 12:07
> To: cocoon-users@xml.apache.org
> Subject: Re: sendmail xsl problem
>
>
> On 17.Apr.2002 -- 10:38 AM, Perry Molendijk wrote:
> > Hello,
> >
> > When I run the sendmail logicsheet I get a problem with the
> > transformation of sendmail.xsl.
> >
> > Somewhere in the process the values of <sendmail:subject>,
> <sendmail:body>
> > and <sendmail:smtphost> are not added to the generated java code.
>
> I've just checked a version into CVS that works for me (while the
> previous showed the errors you see). Please check with CVS version.
>
> 	Chris.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message