[seam-commits] Seam SVN: r9919 - trunk/examples/mail/src/org/jboss/seam/example/mail.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jan 12 13:40:23 EST 2009
Author: norman.richards at jboss.com
Date: 2009-01-12 13:40:23 -0500 (Mon, 12 Jan 2009)
New Revision: 9919
Modified:
trunk/examples/mail/src/org/jboss/seam/example/mail/AsynchronousMailProcessor.java
Log:
JBSEAM-3799
Modified: trunk/examples/mail/src/org/jboss/seam/example/mail/AsynchronousMailProcessor.java
===================================================================
--- trunk/examples/mail/src/org/jboss/seam/example/mail/AsynchronousMailProcessor.java 2009-01-12 18:35:06 UTC (rev 9918)
+++ trunk/examples/mail/src/org/jboss/seam/example/mail/AsynchronousMailProcessor.java 2009-01-12 18:40:23 UTC (rev 9919)
@@ -6,18 +6,21 @@
import org.jboss.seam.annotations.async.Duration;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.faces.Renderer;
+import org.jboss.seam.log.*;
@Name("asynchronousMailProcessor")
@AutoCreate
public class AsynchronousMailProcessor
{
- @Asynchronous
- public void scheduleSend(@Duration long delay, Person person) {
- try {
- Contexts.getEventContext().set("person", person);
- Renderer.instance().render("/simple.xhtml");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ private static final LogProvider log = Logging.getLogProvider(AsynchronousMailProcessor.class);
+
+ @Asynchronous
+ public void scheduleSend(@Duration long delay, Person person) {
+ try {
+ Contexts.getEventContext().set("person", person);
+ Renderer.instance().render("/simple.xhtml");
+ } catch (Exception e) {
+ log.error("Error scheduling send #0",e);
+ }
+ }
}
More information about the seam-commits
mailing list