I’ve got a very weird behavior, in my java (spring) application, I’ve a case where i save an object using hibernateTemplate, then calling a thread which try to get this object again using hibernateTemplate, if am running in debug mode every thing is working fine, but when am not, it most of time give me null pointer exception, as the object returned back from the second call in the thread returns a null object,
so bottom-line here is: i think hibernate didn’t commit its transaction, before the thread is started,
so how to make sure that the object is saved i DB before the thread starts,
Regards,
Executing a flush() should do the job.