Joined: Fri May 18, 2007 1:14 pm Posts: 1 Location: Virginia, USA
|
Hello all:
I have an application that runs the same code on two different databases: one on a remote host (Oracle) and one on the local box (Cache). The remote host is used as the master repository and is used to update the local box periodically through Hibernate. Normally there is a network connection between the two boxes and everything works well. However, the system is designed so that the local box can still work when disconnected from the network. The problem occurs when the box is reconnected. At this time I noticed that the connection that the Session was holding was closed. So I wrote code to reestablish the SessionFactory object which also recreated the connection. One of the things done was to close the SessionFactory object. This was done so that the cache would get wiped of any persistent objects. The code works well except for one table, which still gives me the "BatchUpdate returned unexpected row count" error on a session.update() call. Any ideas on ways to get around this problem?
|
|