Session based transaction!! - Mailing list pgsql-general

From S Arvind
Subject Session based transaction!!
Date
Msg-id abf9211d0912232331w4426a60apc7a84c292fbcf2f@mail.gmail.com
Whole thread Raw
Responses Re: Session based transaction!!  (Tino Wildenhain <tino@wildenhain.de>)
Re: Session based transaction!!  (Bill Moran <wmoran@potentialtech.com>)
Re: Session based transaction!!  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Hi Everyone,

In a web application running in Tomcat and Postgres 8.3 as DB, i need to know whether my given task is feasible or not.
           All the db operation which is done by that web application must be rollback at the end(session dies) and the DB data must be same as the starting stage(of session). Its like virtually placing the data for that session alone and rollbacking the db to the template which is originally been. So whenever users get in the webapplication, the initial data must be the template data only and he can perform any operation for which data is visible for that user alone and when the users leaves(session destroyed) all the data changed in that time must be rollbacked.

I thought this by, When the session created in the application a transaction must be started and all the activites must be done on the DB, but the transaction will not be commited or rollback across request but it must be done across the session. By not destroying the connection and using it for all the work done by that session. when session destroy we can rollback the entire transaction

Is there any other way to achieve the requirements in postgres.
Thanks in advance..

Arvind S



"Many of lifes failure are people who did not realize how close they were to success when they gave up."
-Thomas Edison

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: best way to manage indexes
Next
From: "Albe Laurenz"
Date:
Subject: Re: WARNING: nonstandard use of escape in a string literal