The ApplicationServlet.doService() method delegates to AbstractEngine.service(). In this service method gets a monitor instance from the AbstractEngine.getMonitor(RequestCycle) method.
This monitors methods are called during the processing of the request, the first method begin serviceBegin() and the final method begin serviceEnd().
If an exception, other than PageRedirectException, RedirectException, StaleLinkException and StaleSessionException, is thrown the IMonitor method serviceException() is called.
The AbstractEngine.getMonitor() method currently returns null, you could subclass SimpleEngine and provide your own implementation which could return a TransactionMonitor class which implements IMonitor.
TransactionMonitor.serviceBegin() - begin request transaction
TransactionMonitor.serviceEnd() - end request transaction
TransactionMonitor.serviceException() - rollback request transaction
The AbstractEngine.getMonitor() method takes a RequestCycle parameter, so you have lots of access to various Servlet stuff.
regards Malcolm
From: Eric Everman <[EMAIL PROTECTED]>
To: Christian Sell <[EMAIL PROTECTED]>, Neil Clayton <[EMAIL PROTECTED]>
CC: Norrman Per <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [Tapestry-developer] Tapestry and O/R persitence services
Date: Thu, 16 Jan 2003 17:06:35 -0600
At 1/16/2003, Christian Sell wrote:
what about making this a generic hook in the framework proper, for anyone who requires transaction demarcation. After all that is not an O/R-specific issue..
Yes! This is really what my previous message was getting at. It doesn't need to be a hook for transaction demarcation specifically, but we do need a hook to mark the beginning and ending of a request, even if it crosses several pages.
Does this exist and I'm just not seeing it?
Eric Everman
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
