4 Replies Latest reply on May 10, 2007 9:37 PM by Tony Mai

    @Factory usage

    Tony Mai Apprentice

      Hello,

      Borrowed the concept from example "message", I implemented the following Seam component:

      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("orderMgr")
      public class PendingOrdersManagerBean implements PendingOrdersManager, Serializable {
       private static final long serialVersionUID = 1L;
      
       @DataModel
       private List<TdOrderInfo> workingOrders;
      
       @DataModelSelection
       @Out(required=false)
       private TdOrderInfo orderInfo;
      
       @Factory("workingOrders")
       @Observer("newOrder")
       public void getPendingOrders() {
      ...
      }


      And

      @Name("orderInfo")
      @Scope(ScopeType.EVENT)
      public class TdOrderInfo implements Serializable {
       private static final long serialVersionUID = 1L;
       private OrderInfo orderInfo = null;
       private String lockOwner = null;
      
       public TdOrderInfo() {}
      ...
      }


      However, the method that is marked with @Factory was never called.

      What am I missing here?

      Thanks