Windows application working against Oracle DB trought web services

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, all:
We have a Windows application that make operations against an Oracle
database. The business logic components are in the server and are accesible
from the client interface trought a WebService. The business logic components
call the data access layer components and obtain the results. tha problem is
as follows:
one application requirement is that when a user make some operations, the
tables (or rows) he is working to remain locked until he finish his work,
maybe in that moment maybe after some minutes. But, as I know, Oracle tables
locks are associated with the connections, I mean, if I close the connection
the lock desappears. that´s right? Because I´m calling the business layer
trought a web service, when this call finish the lock ends. Do you know what
I mean? Anyone knows how to maintain locks in the database?
Thank you so much for your help!
cheers!
 
Otto,

Regardless of the database, doing pessimistic locking in ADO.Net is nearly
impossible, by design.

Doing pessimistic locking in ADO.Net in a multi-tiered webservice
environment is very nearly impossible.

One often mentioned option is using transactions, with read locks applied
during Selects. I'm not sure, but I suspect this requires that the connection
remain open during the entire time of the transaction.

The only other option that I am aware of is to implement some sort of custom
locking using extra columns in the tables to indicate locking status. I think
this would be horrendous to support and would only work if all database
access was through your application.

If I were implementing a solution where pessimistic locking was a
high-priority and non-negotiable requirement, I don't think I would use .Net
(or at least ADO.Net) at all.

But I am very interested to hear other opinions on this.

Kerry Moorman
 
Back
Top