Hi Ted,I wouldn't recommend the approach you're taking here. Instead of having the Hibernate transaction span over one page request, you should - as you said yourself - use multiple transactions for logically grouped database interactions.
It is much better to have one Session span over one page request instead. I don't know if it's recommended to put Session handling code in pageAttached and pageDetached - I'm on Tapestry 4.0 myself, and I'm using a HiveMind service to take care of this, so my Session's scope is per request.
Regards, Filip Ted Steen wrote:
Hi! I`m planning on having my hibernate transaction span over one page request.. Is pageAttached(...) and pageDetached(...) the right place to start and end the transaction? I guess this is the first and last thing that happen on a request. Also, is it wise to have the transaction scope over a whole page like this? or should I use several small transactions for each db operation? I mean, what is generally considered good design? I'm using the "hibernate squeezer" ( http://wiki.apache.org/jakarta-tapestry/HibernateTapestrySqueezer ) thanks! /ted --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature
