|
Hi - So, I have built a simple shopping cart app with Hibernate 3, MySQL 5 and Tomcat 6. Now, the crazy thing is that when I start modifying the cart, removing or adding items, things get out of wack fairly quickly and the list of items may be right or wrong. In fact, if I simply reload the cart page, there is a very good chance that the list of items in the cart may change. In the database, the number of items associated with the cart always seems to be right.
I am doing a simple app, analogous to the first hibernate app in the product documentation. Each time I modify the cart I am committing to the db (flush mode commit and commit the transaction). I am certainly not detaching and doing work outside the session, or anything like that.
And I am using a plain JNDI resource for tomcat.
Any ideas as to what's going on?
|