3 Replies Latest reply on Sep 10, 2008 3:39 PM by Francisco Jose Peredo Noguez

    enforce new instance with create=true

    nimo stephan Master

      How can I enforce, that a new Instance of a class should be instantiated instead of searching a instance before creating a new?


      With


      @In(create=true)
      private Object o;



      I specifiy, that a component should be instantiated, only if the intance itself is null. (So it searches before it created a new one).


      Or should I do it with


      private Object o = new O();



      even it s a seam-managed Object.


      any suggestions?