Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Generating email from template outside request/response cycle

$
0
0
Hello-

I'm attempting to use the Wicket 6 email templating mechanism to render an
HTML email from a Panel OUTSIDE the normal request/response cycle -- in a
timer thread. I have already been successful generating email from within a
normal request by following the examples at
http://www.wicket-library.com/wicket-examples/mailtemplate/

The timer thread periodically checks the database for a particular situation
and, if the requirements are met, an email is generated.

I have searched in vain in this forum for a solution. Two main problems I am
running into are:
- Getting the error message "There is no application attached to current
thread"
- Using @SpringBean does not work outside the Wicket context. This is true
even if I start the time thread within Application.init()

I'd prefer to generate the email from a Panel as I already have those in
place but would definitely be willing to do so from a page.

Thanks!

Viewing all articles
Browse latest Browse all 5648

Trending Articles