i'm having this problem: with vaadin 7, i've configured my persistence.xml , here's the code
<?xml version="1.0" encoding="UTF-8"?>
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<persistence-unit name="xxxx">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://xxxxx;databaseName=xxxx;"/>
<property name="javax.persistence.jdbc.user" value="xxxx"/>
<property name="javax.persistence.jdbc.password" value="xxxx"/>
<property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="hibernate.connection.release_mode" value="after_transaction" />
</properties>
</persistence-unit>
When i create a new JPAContainer and i bind it to a Table, i see on MSSQL Activity Monitor my new connection, but if my session is timed out or logged out, i still see the connection on SQL.
If i relog in my app, and i refresh the table, a new connection is opened, and so on.
My problem then is that i'm having a tons of opened connections on my sql server that are never closed.
I've tried to add the property
<property name="hibernate.connection.release_mode" value="after_transaction" />
but nothing changed. Can you help me please? What i'm missing? Thanks so much