Thanks, Mike.

 

________________________________

From: Michael Horwitz [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 18, 2008 9:39 AM
To: [email protected]
Subject: Re: [appfuse-user] Send Email from Service Layer

 

Make your bean extend the interface ServletContextAware. When Spring
wires up your application it will pass in the ServletContext. To obtain
the web URL simply call servletContext.getResource("/index.html") or
something similar. 

 

Mike

 

On 1/18/08, Ding, Qin <[EMAIL PROTECTED]> wrote: 

Yes, Matt, I can pass the emailEngine but how do I get "applicationURL"
value to the service layer? 

Qin

-----Original Message-----
From: Matt Raible [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 4:36 PM
To: [email protected]
Subject: Re: [appfuse-user] Send Email from Service Layer

You should be able to add a setEmailEngine method and wire it up in
your XML file with:

<property name="emailEngine" ref="emailEngine"/> 

Matt

On 1/17/08, Ding, Qin <[EMAIL PROTECTED]> wrote:
> I have a need to send email from service layer (ie.,
> xxxManagerImpl.java) rather than web layer. There is no web layer for 
> the application. This is a scheduled batch job. How do I get the
> emailEngine bean defined in spring applicationContext-service.xml from
> xxxManagerImpl.java?
>
> Thank you.
>
> 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

Reply via email to