Hi all, We have problem with OPEN SESSION IN VIEW pattern. we configured servlet filter like in HIbernate documentation -http://community.jboss.org/wiki/OpenSessioninView; Now everything works fine until user clicks on submit buttons or just links several times, it seems that hibernate use the same connection for all this requests. different type of exceptions thrown after clicks Like:
1.Caused by: org.hibernate.HibernateException: Found shared references to a collection: com.essentialsln.clp.cpol.entity.CountryEntity.states 2.Caused by: org.hibernate.AssertionFailure: collection was processed twice by flush() 3.Caused by: org.hibernate.SessionException: Session is closed!
May be hibernate do not use connection pool and the first request close connection that also used by another requests?
here is c3p0 connection pool configs in our xml. <!-- hibernate.cfg.xml --> <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="c3p0.min_size">5</property> <property name="c3p0.max_size">20</property> <property name="c3p0.timeout">1800</property> <property name="c3p0.max_statements">50</property>
|