This content has been marked as final.
Show 2 replies
-
1. Re: Factory, how to update the value of it
xtof83 Apr 25, 2008 2:53 PM (in response to xtof83)Ah lala
shame on me, google gave me no answer, so I was thinking doing a search on this forum was usseless nut not: first answer :
http://www.seamframework.org/Community/ResettingFactoryObject
So I post the solution again:
Put a @observer
@Observer("resetSelfStudyInfo") @Factory("yyFactory") public void getYYM() { yyFactory = xxFacade.getYYM(param1, param2); }
and in Class2
methodX() { blabla; Events.instance().raiseEvent("resetSelfStudyInfo"); }
Thx Seam ;)
-
2. Re: Factory, how to update the value of it
jpviragine.jpviragine.gmail.com Apr 25, 2008 2:57 PM (in response to xtof83)Try:
Contexts.removeFromAllContexts(
yyFactory
);or in your case:
Contexts.getSessionContext().remove(
yyFactory
);