hibernate - transactions show different data
I'm wondering what's the right way to handle transactions when showing data (just select) and modifying data (create/update/delete). When do I have to use Session.getTransaction()? When do I have to use Session.beginTransaction()? When do I have to commit?
On a main page, I sometimes get a list of data, but if I try refreshing over and over again from the main page I get different sets of data (and some of them differ from what's on the DB so it lookl like I left seom transaction hanging or something).
How's the correct way to work this stuff?
Thanks in advance