Hi,
I'm developing a web app with oracle, hibernate and jsf and i'm having the following problem:
first, each user in our app would be associated with a different session. As for now we have just one test user and so my session is lasting fot the whole of the user session. I've read a lot about this and i do know it's bad. On the other hand lazy loading is essential for the app and as i read:
"if your session is closed then lazy loading will not work".
having that in mind the problem is:
i load e.g. two objects in the session. Then i try to create a new object. When the transaction is committed i can see the following in the console:
-- insert query for the new object
-- two update queries
And then nothing happens. The next line of code is never executed.
When i evict the two objects from the session, the problem is gone. But i do this manually and it's certainly not the solution.
Can anyone tell me the reason for that happening?
Thanks for the help in advance.
|