[jboss-user] [JBoss Seam] - Best way to clear a factory value?

youngm do-not-reply at jboss.com
Fri Jun 22 12:51:01 EDT 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056953#4056953

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056953



More information about the jboss-user mailing list