1 Reply Latest reply on Dec 17, 2007 7:02 AM by Pete Muir

    Invoking seam component from Non-seam environment

    Ram Namachivayam Newbie

      Hi,

      In my application,I am having a bean which implements @Asynchronous method,gets invoked by the caller (a seam component).

      In the bean which implements @Asynchronous method,I need to send email notifications.

      For this I am using seam mail support (<m:message>).

      I am using some heler bean with setter and getter values and basically these values are used in .xhtml page.

      During running,the Asynchronous method gets called and in the helper bean the values are set.

      But I am getting the exception something like
      javax.faces.FacesException: Missing final '@domain' ().

      When I debugged it,this is happening because the bean values are null as the FacesContext is new.

      How to resolve this issue?

      My email code looks like below.

      public void sendMailBySeamAPI(String key,String value,MailBean mb){
      Renderer renderer = (Renderer)Component.getInstance("renderer");
      mb.setEmail(key);
      setEmail(key);
      setName(value);
      mb.setName(value);
      String pageName = "/secure/responseEmail.xhtml";
      try {
      log.debug("In send mail page.."+pageName);
      renderer.render(pageName);
      } catch (Exception e) {
      log.debug("Error send mail", e);
      }

      }

      Using Seam 1.2.1 and my application runs in tomcat ejb micro container.