java - Transaction Issue -


i'm using java , mysql database.

i'm running multiple instances of application. i'm selecting 1 record database , @ same time after fetching, i'm updating status "in process" no other instances can access record.

but happens instances running fast that, when 1 instance accessing 1 record, other instance accessing same record before update done "in process" first instance. should update takes place before other instance can access it? have used conn.settransactionisolation(conn.transaction_read_committed) in code, not helping.

thanks in advance.

you need select update type of statement.

http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -