Colin Paul Adams <[EMAIL PROTECTED]> writes:

<snip>flow listener discussion,/snip>
> 
> I've just read this thread, because I have been trying to 
> work out how to implement pessimistic locking within cocoon. 
> A problem is how to close a database transaction if the user 
> simply walks away from the computer for a few hours, in the 
> middle of a transaction. Session timeout will close the 
> session, but a session listener is needed to then go and 
> rollback the database transaction (or any other such resources held).

Maybe I'm missing something, but why aren't you setting your database
transaction timeout limit to something just a bit larger than the
session timeout?  Or, alternatively, if you're using EJB's, set your
container TX timeout?  In either case the appropriate catch clause in
your code can then do resource clean up as needed...





Reply via email to