Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Threads in transaction



Consider this as a scenario from a java application:

I have 2 threads T1 and T2.

Thread T1 retreives a record from database . (Raw1)
edited Raw1--- call it as T1Updated_Data

Thread T2 retreives the same record from database .(Raw1)
edited Raw1--- call it as T2Updated_Data
T2 commits the record (T2Updated_Data) .

After that T1 commits the record(T1Updated_Data) .

What will happen at this time? transaction commit or not?

Database is Oracle.