I'd like to place a hook in Tapestry to know when a request fails, so that I can:

    (1) roll back my transaction,
    (2) send an email to the administrator, and
    (3) show a user-friendly error page.

I'd normally do this through my web.xml (servlet filter + error page descriptor), but Tapestry swallows exceptions and doesn't pass them to the container. Of course this makes sense in my dev environment -- I *want* the very helpful error reporting! -- but not in production. And even in dev, I still want the rollback.

So what is the right point to hook in this custom error handling?

It seems that I can create an "Exception" page. That addresses (3), but what about (1) and (2)? Do I make the Exception page class implement PageAttachListener or PageBeginRenderListener and do rollback & email there ... or is that just a hack?

What is the best-practice approach here?

Cheers,

Paul

_________________________________________________________________

"Verbing weirds language."  -- Bill Watterson


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

Reply via email to