[SOLVED] JTable Refresh -> Problem with Hibernate Session?

Hi,

I know that JTable data refreshing seems to be a very common problem. I have a JTable and I want to refresh it by pressing a button after I insert a new record in MySQL through INSERT INTO `users` (`userid`, `userdescription`, `username`) VALUES (1, 'Description test', 'Name test');

So I'm thinking that my problem is related to the Session, because when I close my App and re-run it I can get all values from DB, but if I insert them while running my App my refresh doesn't pick up the new data because maybe it needs to close the current session and create a new one. Am I right? Please, any suggestions are always welcome.

Thank you.

Last edited by buyapentiumjerk; 06-15-2011 at 02:17 AM.
Reason: Solved

Ok, I've solved this issue by putting the Model Creation inside a procedure and whenever I alter mu data structure I just call that procedure and my Jtable gets all the information I need. So there is no problem with sessions and no more removeRow, setValueAt and addRow. One thing I0ve noticed though is that when I don't use Envers if I update my data directly in MySQL if I press Refresh button with this method I get the new data in my JTable but when using Envers this doesn't happen only when I insert a new Entity through the program. Ohh well, for me this just works.