Hi all, just a quick question.

I have been asked to implement a batch update to a database and I have
considered accomplishing this in a Session bean. The process to be used is:

    lock all affected rows
    perform business logic
    perform update
    commit

For various reasons the developers wish to lock the rows BEFORE the business
logic (yeah I know the issues but this is the requirement). My understanding
is that the locking level achieved is dictated by transaction isolation
level that is designated at bean deployment time (unless BMT?).  The
question here is how to establish the lock PRIOR to performing the business
logic, as the business logic is being implemented in a session bean HOW can
we lock the rows.

Normally a SELECT FOR UPDATE would achieve this, but the Oracle JDBC drivers
seem to throw an exception? I did not think a SELECT X,Y,Z alone would be
enough to instigate a lock OR am I incorrect and the select WILL lock the
rows?

Thanks for any illumination :)

(I checked various FAQ's and there seems to little info on Transactions and
Transaction Isolation with regard to EJB).

Regards

Robert Masters
Java Architect


mobile: 041 221 3097
Comcare Australia
http://www.comcare.gov.au <http://www.comcare.gov.au/>

===========================================================================
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".

Reply via email to