Database connections not closed after idle-timeout in wildfly Datasource

前端 未结 1 764
小鲜肉
小鲜肉 2020-12-19 03:12

I have an application running under wildfly 8.1 The database connections used in the applications are taken from a Datasource defined in standalone.xml file.

Proble

相关标签:
1条回答
  • 2020-12-19 03:53

    It turns out that Hibernate was holding connection and not releasing them to the Pool. Irrespective of the fact that we are using thread local context. But after adding <property name="hibernate.connection.release_mode">after_transaction</property> to the hibernate config. The problem got solved.

    PS: I still dont understand why we need to define this explicitly and why the auto release_mode would not release the connection once the session is closed.

    0 讨论(0)
提交回复
热议问题