Hi friends, I want to log information about all uncommitted transactions before calling rollback. or during roll back. Is there any way to do that? In my code,I have setAutocommit(false) executeQuery() con.close(); performRollback();
Now in performRollback()is there any way to know about uncommitted transaction?
Saira, Transactions only apply to operations that manipulate the data in the database -- in other words when you do DELETE, INSERT or UPDATE operations. Since (in the code you posted) you are calling the "executeQuery()" method, I assume you are performing a query. Since a query does not manipulate data, the "rollback" is redundant -- or am I missing something?
Most databases do not offer a way to access details of non-committed transactions, but if they do, then it is usually a proprietary way. So if database independence is important to you, I don't think your task is achievable.
Good Luck, Avi.
posted 15 years ago
Hi Avi, thanks for your reply. I have jsut posted a pseduo code. the meaning of executeQuery is performing some SQL update. and in con.close() I am releasing the connection and putting it back to pool.
Your mother is a hamster and your father smells of tiny ads!
Devious Experiments for a Truly Passive Greenhouse!