Actually, I am using ThreadLocal patter in my application (as described in Hibernate documantation).
I have implemented a service to wrap up this pattern.
The thing is that my application is multitired, so I'm closing session after each save, update or read of business objects.
And after I add new child object to its parent, update parent and save the new child, I have that object in collection but it disappears and then again appears (and so on and so on) after performing multiple reads (triggered by refreshing the browser's content).
So I'm pretty sure I got problems with session's cache, though can't figure out the cure by now...
|