Hello there! I'm having serious problems with Isolation levels in a production application.
I don't know if it is my fault (99.999% of sure that is) or spring's + database configuration.
Here's what happening: For 0.0049% of our access, we are having cuncurrent requests to a method (probably caused by the user clicking twice in the submit).
The problem is a classic dirty_read problem:
public void registerBid(){
//we check to see if user already bid if not, we save the bid
}
now, what's happening is that Thread A starts, check if user has bid, (he does not), Thread B gets the context, check if user has the bid (not yet). Thread A takes back control, saves the bid, Thread B assumes the control, saves the Bid again.
Well, big problem for us.
Here's my transaction attributes:
<prop key="saveBid*">PROPAGATION_REQUIRED,ISOLATION_SERI ALIZABLE</prop>
I was expecting Thread B not being able to access my Service, until Thread A finishes it.
I could add a Serializable to the method, but the method access other services, and that could cause bottlenecks.
My database is Oracle 10.1.2 (I believe it supports Serializable)
Any ideas please?


Reply With Quote
Nice to have so many great developers willing to help 
