5 Replies Latest reply on Jan 5, 2009 3:30 PM by Dylan Janeke

    Asynchronous calls to session beans..

    Dylan Janeke Newbie

      Hi All!,

      I am trying to access a statefull session bean from a asynchronous call with no luck whatsoever, here is my code :

      public class EmailService{
          @Logger Log log;
          Renderer renderer;
          Authenticator authenticator;
          public void sendMail(){
              log.info("Sending mail asynchronously!!!!!");
              Contexts.getEventContext().set("eList", users);

      Here is the bean i am trying to access :

      public class Authenticator implements AuthenticatorLocal,Serializable
          @Logger Log log;
          @In Credentials credentials;
          EntityManager em;
          List<User_E> emailUsers;

      Now the thing is that authenticator in EmailServices resolves to null.. I have even tried not bijecting but using something like this :

      Authenticator authenticator = (Authenticater) Contexts.getSessionContext().get("authenticator");

      And that won't work either... I am seriously ready to start crying. Please if any one can help , I would greatly appreciate it - Thanks.