Skip to content

Instantly share code, notes, and snippets.

@JohnZavyn
Created August 17, 2016 15:08
Show Gist options
  • Save JohnZavyn/ba11dfffe06318c9f793f41c767c24a3 to your computer and use it in GitHub Desktop.
Save JohnZavyn/ba11dfffe06318c9f793f41c767c24a3 to your computer and use it in GitHub Desktop.
Fix for "HibernateJpaDialect - JDBC Connection to reset not identical to originally prepared Connection" warning
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="pu"/>
<property name="packagesToScan">
<list>
<value>com.appia.model.beans</value>
</list>
</property>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="${orm.show_sql}"/>
<property name="databasePlatform" value="com.appia.pss.util.PostgresDialect"/>
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.format_sql">${orm.format_sql}</prop>
<prop key="hibernate.connection.release_mode">on_close</prop>
</props>
</property>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment