Hi Priya,
Thanks for the reply. My queries are basic hibernate select statements.
Ex:
Code:
SELECT user
FROM UserDTOImpl user
WHERE user.userId=:localUserId
Now consider the following calls being made under one transaction:
Transaction 1
MethodA is executed once with userId = 3
ResultSet is User("xxx") is returned
Transaction 2
MethodA is executed once with userId = 5
ResultSet is User("yyy") is returned
Transaction 3
MethodA is executed twice, once with userId = 3 and then with userId = 5
ResultSet is User("xxx") is returned for first call
For Second Call, instead of User("yyy") being returned, User("xxx") and User("yyy") are returned.
The only ways the I have been able to resolve this is through openming a new session for each call, or perform each call under a seperate transaction.
I wanted to do each call under the same transaction but without having to open a new session each time. Can anyone help?