I am currently doing this and would be interested in additional feedback. The system I am building is actually a hybrid using a proprietary solution with hibernate and so, i am often inserting/updating through the proprietary system and getting data via hibernate. From my initial tests, I found that anytime i work with the proprietary solution to insert/update/delete, I need to call refresh on the session (e.g. hibernateSession.refresh()), otherwise if I immediately retrieved the data after doing an update or delete, I got stale data.
Unfortunately, i have no idea if this is the best practice or not... I would be interested in other's feedback.
HTH,
Paul
|