This content has been marked as final.
Show 4 replies
-
1. Re: Interceptors on Tomcat
gavin.king Oct 21, 2009 3:08 PM (in response to fabiowg)Well, you've left out the most critical piece of code ... how do you obtain the instance of Game?
-
2. Re: Interceptors on Tomcat
fabiowg Oct 21, 2009 7:09 PM (in response to fabiowg)The instance of the game is supposed to be obtained by the EL evaluation of this line of home.xhtml:
<h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}"/>
And the reset method was called because it was marked with @PostConstruct:
@PostConstruct public void reset() { this.smallest = 0; this.guess = 0; this.remainingGuesses = 10; this.biggest = maxNumber; this.number = randomNumber.get(); }
I noticed that inside the body of InterceptMethodHandler.invoke method there's a reference to a proxy of the Game with everything injected (variable
self
), but the fieldtarget
of this handler references an empty instance of Game, and that's the instance which has the methods invoked. -
3. Re: Interceptors on Tomcat
gavin.king Oct 22, 2009 2:26 AM (in response to fabiowg)Well, that definitely looks buggy. Please submit your test code to JIRA.
-
4. Re: Interceptors on Tomcat
mbogoevici Oct 29, 2009 4:59 AM (in response to fabiowg)There was an issue with field-based injection in CR1, which is fixed in latest trunk ... or CR2 ;).