On 08/03/2004 21:31 Shyam A wrote:
[snip]
Is there a possibilty of a deadlock occuring in the
above code when there are mutliple users concurrently
accessing the system.i.e, multiple users update
multiple rows of the table at the same time

I can't see anything in your update that might cause deadlock but perhaps you'd better run it past an Oracle expert just to be sure.



Could somebody throw some light on this?


My understanding is that deadlocks are automatically
handled by the DBMS. Anyway, is there a way to prevent
the possiblity of deadlocks in my program ?

One more thing - in the code above and in other
"Select" queries, I open and close the Connection from
the connection pool. However, I do not close the
Statement or ResultSet objects. Will this lead to
problems ? My understanding is that closing the
Connection object will free up all the associated
resources.

True but rememeber that when using a connection from a connection pool the close() method probably (i.e. 99.99999999% certainly) won't close the physical connection but just return it to the pool. So your clean-up won't happen. Some connection pools have the ability to track and close orphaned Statements and ResultSets. I suppose you need to consult your containers docs.



--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business |
| Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to