> Hi,
>
> Is there any method to lock some of the rows in a table. I want to
> lock some rows of a table which are being updated so that nobody else
> can modify the data. The information about the user who locked a
> particular row is needed, when tried to find the bean corresponding to
> that particular row .
>BMP or CMP? Which database?
>
>If you are using BMP with Sybase ASE/ASA or MS SQL Server, you can use
>"select ... from ... holdlock where ..." in your ejbLoad.
How long do you need to hold the lock on the rows ? Is it during a 'normal'
transaction or across what might be considered normal transaction
boundaries ? The holdlock will prevent someone upgrading their lock to an
update lock but I think you want to identify the user who is currently
holding the lock which is a bit messy. This is very hard to do using
standard SQL calls and might vary across DBMS's (some DBMS's may give the
user locking the resource in the SQL error message). You would have to do
this using application code and I think this is nontrivial unless someone
out there has a better solution.
cheers,
eddie
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".