Tapestry handles the page pool for you; notice that when you invoke
IRequestCycle.getPage() multiple times, you'll get the same page (for
the same name). The request cycle works with various Tapestry services
to get an instnace from the pool (or create it on the fly) and ensures
that the page instance is returned to the pool at the end of the
request.

You responsibility is to keep the page's idempotent (containing no
client-specific state) and free of any dangling refererences when they
go back into the pool; that's still mostly Tapestry's responsiblility
... the reason for the abstract classes, and annotations, and class
enhancement.

On 10/24/05, Ron Piterman <[EMAIL PROTECTED]> wrote:
> I think tapestry handles it in a threaded model, so when your thread
> ends the page will return to the pool.
>
> ציטוט Martin Strand:
> > Hi.
> > I'm using a login listener that does something like this:
> > ----------------------------------
> > try
> > {
> >     page = cycle.getPage(...);
> >     page.login(...); // throws AuthenticationException
> >     return page;
> > }
> > catch (AuthenticationFailedException e)
> > {
> >     // --> Is a cleanup necessary here?
> >     return null;
> > }
> > ----------------------------------
> > If I get a page with getPage(), and then an AuthenticationException is
> > thrown, don't I need to return that page to the pool again somehow?
> >
> > --Martin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Reply via email to