[jboss-user] [JBoss Seam] - EL-exceptions in email render from async class
Frippe
do-not-reply at jboss.com
Wed Aug 15 08:54:41 EDT 2007
I have an asynchronus method sending emails, but I can't get any values to work due to EL-exceptions.
My class:
| @Name("emailProcessor")
| @AutoCreate
| public class EmailProcessor {
|
| @Asynchronous
| @Transactional
| public QuartzTriggerHandle scheduleSend(@Expiration Date endDate, Company company) {
| for(Person p : company.getPersons()){
| try {
| renderer.render("/mails/reminder.xhtml");
| log.debug("Email sent successfully");
| }
| catch (Exception e) {
| log.debug("Email sending failed: " + e.getMessage());
| e.printStackTrace();
| }
|
|
| }
|
| }
|
| }
|
And my XHTML-file:
<m:message xmlns="http://www.w3.org/1999/xhtml"
| xmlns:m="http://jboss.com/products/seam/mail"
| xmlns:h="http://java.sun.com/jsf/html">
|
| <m:from name="Påminnelsemailet" address="admin at two.se" />
| <m:to name="{p.fullName}">{p.email}</m:to>
| <m:subject>Glöm inte. . .</m:subject>
|
| <m:body>
| <p><h:outputText value="Hej {p.name}"/>,<br/>
| Glöm inte att ...
| </p>
| </m:body>
|
| </m:message>
If I cut out the EL-expressions, the mails are sent successfully.
I'm not quite sure how to outject the persons to be able to send the mails, anyone got an idea?
I probably get an RTFM on this one, but I got stuck on this...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074418#4074418
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074418
More information about the jboss-user
mailing list