1 Reply Latest reply on Jun 22, 2007 1:01 PM by Pete Muir

    Best way to clear a factory value?

    youngm Novice

      I have a factory method which is conversation scoped but I occasionally want to clear/reload this value in the middle of a conversation. I am currently doing:

      public void Component {
      
      @In("#{factoryValue}")
      @Out
      List factoryValue;
      
      @Factory("factoryValue")
      public List createFactoryValue() {
       //Create List here
      }
      
      public void clearValue() {
       factoryValue = null;
      }
      
      }


      But this seems rather complex to have to inject and outject a value just to clear it. Another option is to simply clear it out of the context the variable exists in. Does anyone else know of any other ways to clear the value of a factory method?

      Mike