0

I have a struts 2 application and a toplink persistence provider running on tomcat 6.0.20 and a MySql 5.1.38 server on a GNU/Linux machine. After committing the data the when i go to retrieve it the data it has disappeared from the database.

I do a em.commit() and em.flush() after my queries have executed. How do they disappear? I am using all standard configuration files. I have reduced the wait_timeout and the interactive_timout period in mysql. Also am using autoReconnectforPools in my persistence.xml.

I also invalidate the cache on every users logout.

Any ideas?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
sam
  • 21
  • 2
  • What is `em.commit()`? There is not such method on http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html – Pascal Thivent Oct 20 '09 at 14:11

1 Answers1

1

anyway it does not matter, the problem was solved by removing softweak from persistence.xml's entity type declaration and adding hardweak in its place.

sam
  • 21
  • 2