2 Replies Latest reply on Mar 10, 2008 1:58 AM by kenclark

    Injecting a Stateless SB into another

    kenclark

      I need to use a stateless session bean from inside another stateless session bean, so I try to inject the second into the first.  However, I get this error:


      @In attribute requires non-null value: productAction.NodeLoader


      Here are snippets of the two SBs:



      @Stateless
      @Name("productAction")
      public class ProductAction implements ProductActionLocal
      {
      
          @PersistenceContext
          private EntityManager em;
          @Logger
          private Log log;
          @Out
          private List<Node> topProducts = null;
      // I also tried @In(value="nodeLoader")
          @In
          private NodeLoaderLocal nodeLoader;
      
       ...
      }




      @Stateless
      @Name("nodeLoader")
      public class NodeLoader implements NodeLoaderLocal
      {
      ...
      }
      



      What am I doing wrong?


      Thanks,
      ken clark