2 Replies Latest reply on Dec 3, 2008 8:24 AM by nimo stephan

    enforce refresh of factory-instance

    nimo stephan Master

      I have this in a conversation-scope:



      @Factory("allEntity")
      public List <Entity> getEntity() { return ...; }




      I have a reference to my factory-instance with that:



      (List<Entity>) Component.getInstance("allEntity")



      Now I want, that this reference should be refreshed.
      Is it good to assign this reference with null?
      Or should I store this factory into the event-scope?


      What is best-practice to refresh a factory?:


      This does not work:


      (List<Entity>) Component.getInstance("allEntity") = this.getEntity();




      This also does not work:


      (List<Entity>) Component.getInstance("allEntity") = null;