I use EJB to update a record in a MySQL 4 database.
After this I try to read with Hibernate, but the data is not updated yet.
After a page refresh, the new data is there.
I use JBoss 4.0.2 and EJB 2.0 . The data comes by a http request, a portlet calls a stateless sessionbean and this calls a entitybean to update a record in the database. The entitiybean is configured as "Instance Per Transaction CMP 2.x EntityBean" . Then the entitybean is left and the sessionbean is left. (Then the data should be written into the database, I assumed). The portlet class reads the records of the updated table using hibernate. But now the record that should have been updated, still contains the old values.
Then I try to call the data again (without any action) and now hibernate receives the updated record correctly.
Is this a kind of caching problem? How can I solve this problem?
Thanks for your reply.