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

    Stateless EJBs being injected into SessionScoped beans

    meetoblivion

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




      @Stateless
      public class TimedExecutor implements java.io.Serializable{



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




      @SessionScoped
      @Named("initAction")
      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.