Hi,
I begin with hibernate and spring, I made a little web app with one bean, I insert a few entries automatically when my app start, I am able to get the entries from my database and to dipslay a list on a JSP but when I try to add entries through my JSP page, my database is not updated, but the entry appear on my list on my JSP page (with firefox only, not with the browser embedded with Eclipse). There is no exceptions or errors.
I think Hibernate use some cache but I don't know how to do to make hibernate commit the changes into the database. I use MySQL.
I use Hibernate with .hbm.xml mappings and JBoss 5.
My persistence.xml :
Code:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="MyMovies">
<!-- A datasource managed by the Java EE runtime environment -->
<jta-data-source>java:/MyMoviesDS</jta-data-source>
<properties>
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<!-- SQL stdout logging -->
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="use_sql_comments" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost/MyMovies"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.password" value=""/>
<!-- On deployment of this persistence unit, drop and then re-create all tables -->
<property name="hibernate.hbm2ddl.auto" value="create"/>
</properties>
</persistence-unit>
</persistence>
any ides ?