Im using Hibernate JPA/Postgresql with Icefaces as a renderer.
I've got a problem updating an object, here is what happens:
I have a customer with a name, I can edit it from a ice:dataTable (filled by a ListDataModel in the code behind) by clicking on the edit link on each row of my table.
Then I wanna change his name, and things are going right... or not. I mean the updates will work 20 times and then sudenly wont anymore, or juste after two times... it's completely random.
Actually the customer's name field is not changed in the database (Postgresql) and when I check my customer's name in the code (with log4j) right after the commit, it says the right modification, but nothing has changed in the database. And I'm in a situation where the object in the hibernate cache is not synchronised with the one in the database.
Finally, if i move to another page of my application and come back to edit my customer again, it'll work... till it crashes again....
Is that something to do with the hibernate cache? The transaction with the database? The database itself (connection lost and then impossible to do anything till i open a new session with it?)? I'm lost!
Thanks in advance for your help,
I might start looking into where the transaction gets committed. Perhaps most of the time the transaction commits, but sometimes, an exception gets thrown, and the commit method doesn't get executed? Possible?
posted 11 years ago
Thanks for your quick answer.
I forgot to say that no exception is raised when the problem occurs, or maybe one that I'm not catching?
Here is my code snippet:
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!