The problem I am getting is that in a single transaction, if there are suppose 4 insert statements fired, and in next sequence select query is fired on same table then that select returns only 3 records and not 4 (total uncommitted records) which is wrong, it does not return the last inserted record to select query. But while committing it saves all 4 records. What will be the problem why select gets only 3 records instead of 4? We are using EJB 2.1
The transaction is like this: In a first class it calls mstHome.create(..,..,..,....) method to insert a record in a table for say 4 times in loop. This successfully creates records. Still data is not committed. Then the next class in chain fires JDBC select statement on the same table to get newly entered ids- which returns only 3 records instead of 4. Finally while committing, 4 records gets committed.
I am bit confused about the behavior of transaction as if there are 3 inserts, select returns 2 records and so. As the project is large & complex, I'll not be able to post exact code here. And there are no errors in between transaction processing.
Thanks in advance, Deepa
posted 10 years ago
This is starting to get a little clearer -- your example helped. What verison of WAS are you using and what Database (and driver) are you using?