1 Reply Latest reply on Dec 6, 2008 2:24 PM by blabno

    Injecting objects into mail message from SLSB

    Rick Kilcoyne Newbie

      I have a SLSB service object that sends an email message using the renderer. This message needs access to an object in the scope of a method in my SLSB. Which approach is the right approach?

      1) Biject this object in/out of a private member variable in my SLSB to be accessed inside my email xhtml template. (seems unnatural within a SLSB and prone to concurrency issues).

      2) Assign this object to a context variable and remove from context after message is rendered. e.g.:

      Contexts.getEventContext().set("myEntityObject", obj);
      Contexts.getEventContext().set("myEntityObject", null);

      If #2 is the right approach, am I using the appropriate context? Anyone know anything about the METHOD context?