Hi, In my Application , in a Stateless Session Bean, I am handling the data transaction via DataAccess Object Class. During this process , I have to update two transactions in two different tables. While doing so, it is commiting the transaction in the first table but the second one fails ? I set the transaction attribute for the SLB methods as required. And also before two transaction is not over , I am not commiting the transactions ? While the start of the program itself , I kept db commit to off. How to avoid this incorrect transaction without changing SLB to EntityBean. Is there any settings in WAS4.0 to avoid the above transaction ? Can any one help me to solve this ? TAI, N.Ravisankar
Hi "NRavi", We have a naming policy here at JavaRanch where all publicly displayed names take the form, "Firstname Surname". Could you please edit your profile to bring it into line? Thanks in advance and we hope that you enjoy your stay at the ranch! Cheers Simon
As long as you�re using DAO�s you have the capacity to control the isolation level and the scope of the transaction, what gives you great flexibility, take a better look at the java.sql.Connection API(you can set the isolation level or demarcate the scope of the transaction with this one) and also at javax.transaction.UserTransaction(you can demarcate the scope of the transaction with this one) API, if you do a correct implementation and if you DB supports transactions you should be able to correct this problem.
Joined: Jan 06, 2001
Hi, you can have an introduction to the transaction concepts here