cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <rica...@apache.org>
Subject Re: simple-page request creates two XSPGenerator instances
Date Tue, 30 May 2000 12:26:06 GMT
> Rob Parker wrote:
> Each request to simple-page.xsp seems to create two instances of the
> generated
> xsp class. For example, I added the following to the simple page
> example...
> 
> <xsp:logic>
>   static int their_ctr=0;
>   static int their_hitctr=0;
> 
>   public _simple_page_xsp()
>   {
>     super();
>     their_ctr++;
>   }
> </xsp:logic>
> 
> Hence ctr is incremented by the constructor. When I output this value
> with an <xsp:expr> in
> the page...
> 
> I've been created <xsp:expr> their_ctr </xsp:expr> times and hit
> <xsp:expr> ++their_hitctr </xsp:expr> times.
> 
> I find that the hit count is correct, but that the instance count
> increases by 2, except on the first request. Is this
> the anticipated behaviour?

This may be the result of a (fixed) bug that resulted in
unnecessary recompilation of the generated class. I regret
no being able to test this assertion right now (I screwed
up my Linux installation and still don't have a working
Java environment), but I suggest you download the latest
Cocoon2 version from the CVS. This might correct this
problem.

Regards,

Ricardo

Mime
View raw message