You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chan Sammy <cs...@gmail.com> on 2005/03/01 20:30:38 UTC

When is Visit destroyed?

I store session data in Visit object. However, it is so 'volatile' and
get destroyed very erratically and I feel insecure about using Visit.
By destroy I mean  this

public class Visit{
    protected void finalize() throws Throwable {
        logger.warn("Visit destroyed");
    }
}


Shouldn't it be destroyed only when HttpSession timeout? But my tests
are very short. I tried running several times within minutes and
sometimes they all fail.
Is it possible that my code cause it to be destroyed?
When does Visit get destroyed?

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: When is Visit destroyed?

Posted by Bryan Lewis <br...@maine.rr.com>.
This is definitely unusual.  The Visit, once created, lives in the
HttpSession and should not be destroyed until the user's session ends.  It
doesn't get destroyed erratically.  I'd look for something in your code.
Perhaps you have some code that's deleting the engine, which might be
removing the last reference to the Visit.  Or maybe you're calling
engine.restart().

Check the Tapestry source code for AbstractEngine.


----- Original Message ----- 
From: "Chan Sammy" <cs...@gmail.com>
To: <ta...@jakarta.apache.org>
Sent: Tuesday, March 01, 2005 2:30 PM
Subject: When is Visit destroyed?


> I store session data in Visit object. However, it is so 'volatile' and
> get destroyed very erratically and I feel insecure about using Visit.
> By destroy I mean  this
>
> public class Visit{
>     protected void finalize() throws Throwable {
>         logger.warn("Visit destroyed");
>     }
> }
>
>
> Shouldn't it be destroyed only when HttpSession timeout? But my tests
> are very short. I tried running several times within minutes and
> sometimes they all fail.
> Is it possible that my code cause it to be destroyed?
> When does Visit get destroyed?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: When is Visit destroyed?

Posted by Karthik Abram <ka...@neovera.com>.
What app server and browser are you using?

-----Original Message-----
From: Chan Sammy [mailto:csammy@gmail.com]
Sent: Tuesday, March 01, 2005 2:31 PM
To: tapestry-user@jakarta.apache.org
Subject: When is Visit destroyed?


I store session data in Visit object. However, it is so 'volatile' and
get destroyed very erratically and I feel insecure about using Visit.
By destroy I mean  this

public class Visit{
    protected void finalize() throws Throwable {
        logger.warn("Visit destroyed");
    }
}


Shouldn't it be destroyed only when HttpSession timeout? But my tests
are very short. I tried running several times within minutes and
sometimes they all fail.
Is it possible that my code cause it to be destroyed?
When does Visit get destroyed?

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org