1 Reply Latest reply on Jan 16, 2010 8:02 PM by Alexander Bell

    Stateless EJBs being injected into SessionScoped beans

    John Ament Master

      I'm not sure if this is going to be a Weld issue or a GF issue.  Here's the situation:

      public class TimedExecutor implements java.io.Serializable{

      I want to inject an instance of this into the following:

      public class InitAction implements java.io.Serializable {
      @Inject TimedExecutor timedExecutor;

      Now, even though TimedExecutor is marked Serializable, Weld does not recognize the generated class as serializable and will not inject it into a SessionScoped bean.  When I switch to @EJB TimedExecutor timedExecutor; it works correctly.