I checked out today seam 1.2.1 and genereded with seam-gen a application,
if i use mail-api, if call render.. i get follow excpetion:
12:44:08,377 ERROR [Regist] ---------------- Error : org.jboss.seam.core.dispatcher is not installed in components.xml
@Name("asynchronousMailProcessor") @AutoCreate public class AsynchronousMailProcessor { @Asynchronous public void scheduleSend(@Duration long delay,Usr usr) { try { Contexts.getEventContext().set("usr", usr); Renderer.instance().render("/emailtemplates/registmsg.xhtml"); } catch (Exception e) { e.printStackTrace(); } } }
try{ em.persist(usr); asynchronousMailProcessor.scheduleSend(3000, usr); return "/registok.xhtml"; }catch(Exception e){ log.error("---------------- Error : " + e.getMessage()); log.error(e.getStackTrace()); facesMessages.add("Registrierung fehlgeschlagen, versuchen es später nochmal."); return null; }
By default the dispatcher isn't in installed - add the entry to components.xml (you need as you are using an async method)