Hi,

Thank you for the code. I used parts of your solution and combined it with
a ServletFilter that do the commit/rollback stuff. I made SessionWrapper a
public
class and also included a boolean success flag; the SessionWrapper is also
stored
in the ServletRequest. When a Hibernate exception occurs, the
SessionWrapper#success
field is set to false, and an ApplicationRuntimeException is thrown. The
servlet filter 
post processing either commit or rollback depending on the success flag.

In effect, I now have transactions of single request scope for one or more 
pages. The code is not quite ready yet, but if anyone is interested ....


/Per Norrman 

> -----Original Message-----
> From: Eric Everman [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 10, 2003 5:10 PM
> To: [EMAIL PROTECTED]
> Subject: [Tapestry-developer] Tapestry and O/R persitence services
> 
> 
> Norrman-
> 
> I wrote a Tapestry extension for Hibernate sessions, but I 
> have not tried 
> it yet in 2.3.  It creates Hibernate sessions on demand with 
> a scope of a 
> single page for a single request.  Sessions are automatically 
> committed 
> when the page renders or when you switch pages (cycle.setPage()).
> 
> My source code is attached - let me know if you have any 
> problems using it 
> in 2.3.
> 
> Eric Everman
> 
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/


-------------------------------------------------------
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

Reply via email to