Yep, it is on purpose - but I think that Jesse has said that it's supposed to
go away eventually...

On the meantime, maybe the @Cached annotation can help you.
http://tacos.sourceforge.net/tacos4.1/tacos-annotations/index.html
It's in the 4.1.1-SNAPSHOT and it annotates a normal non-abstract method,
caching its result and returning it on further invocations.

I originally wrote this to get away from all those null checks on abstract
properties... or the initializations on pageBeginRender - but it looks like it's
working for this situation as well !


carlos f wrote:
carlos f wrote:
This occurs when i am executing tests as part of my selenium integration
tests.

. . .
Is this a configuration/user error on my side, or is the framework still
purposefully evaluating these OGNL expressions 4 times?


I am still looking into this, but it appears that is the way the framework
is intended to operate.

When an OGNL expression is first compiled, the underlying method the
expression resolves to is invoked 3 times.  Subsequent calls to the ONGL
Node the compilation process generates executes the underlying method an
additional time.

When running tapestry in a standard environment, each expression should only
be compiled once and then added to the cache.  However, for non-idempotent
methods a single expression compilation (and its 3 spurious invocations)
will cause all sorts of hell.

My integration tests, which spits up a Jetty container for each test run,
never have the benefit of working with pre-compiled expressions.

I am still trying to see if there is something I can do to avoid the 3
initial calls.  Otherwise I am going to have to rethink a bit of
functionality that seemed to work just fine with tap 4.0.x.

Carlos

--
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to