Actually i m using stuts,oracle(stored procedure),jsp in my application. i have done all thing like writing stored procedure ,inserting data,validating data etc and finally data goes inside database. But friends my problem is that when i do two simultanious transaction in aplication then both trasaction are inserted into databases without giving me any exception which i expect from second transaction.
Suppose I m login on two diffrent computers with same user id and doing following transactions simulteneously Txn A giving payemnt 2000 Txn B also giving payemnt 2000
Now due to some business logic i m expecting only one transaction should be insert into DB & other should raise me my exception
My client not excepting Lock from start to end on data inserting stored procedure
Now my databses stored procedure not contain any lock contain only commits
how can i manage two independant transaction my application