We run into a "not in service" problem yesterday on one of our Spring+Hibernate applications. This application has been running for over two years without any performance issues. There isn't any Hibernate configuration changes. And it only occurs on the deployment box, but not our development box. The site hosting firm said that there is far enough memory for it.
We inserted log code and turned on the log on Hibernate. The log messages shall be the followings:
After reloading the Tomcat server for a whole, the same fetch won't respond. And the log messages are the following instead:Code:DEBUG com.abc.xyz.web.MyController.viewHandler:42 - Start fetching ... DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.getTransaction:319 - Using transaction object [org.springframework.orm.hibernate3.HibernateTransactionManager$HibernateTransactionObject@6a4268] DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.getTransaction:347 - Creating new transaction with name [com.abc.xyz.data.AdEntryDao.getById]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin:430 - Opened new Session [org.hibernate.impl.SessionImpl@2de41d] for Hibernate transaction DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin:441 - Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@2de41d] DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin:504 - Exposing Hibernate transaction as JDBC transaction [jdbc:postgresql://localhost:5432/myApp, UserName=postgre, PostgreSQL Native Driver] DEBUG org.springframework.orm.hibernate3.HibernateTemplate.execute:365 - Found thread-bound Session for HibernateTemplate DEBUG org.springframework.orm.hibernate3.HibernateTemplate.execute:389 - Not closing pre-bound Hibernate Session after HibernateTemplate DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.triggerBeforeCommit:833 - Triggering beforeCommit synchronization DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.triggerBeforeCompletion:846 - Triggering beforeCompletion synchronization DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.processCommit:660 - Initiating transaction commit DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit:554 - Committing Hibernate transaction on Session [org.hibernate.impl.SessionImpl@2de41d] DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.triggerAfterCommit:859 - Triggering afterCommit synchronization DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.triggerAfterCompletion:875 - Triggering afterCompletion synchronization DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doCleanupAfterCompletion:633 - Closing Hibernate Session [org.hibernate.impl.SessionImpl@2de41d] after transaction DEBUG org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession:772 - Closing Hibernate Session DEBUG com.abc.xyz.web.MyController.viewHandler:47 - End of fetching ... 78
It seems fail to establish the JDBC connection of a Hibernation session. How to fix this issue if that is the cause indeed?Code:DEBUG com.abc.xyz.web.MyController.viewHandler:42 - Start fetching ... DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.getTransaction:319 - Using transaction object [org.springframework.orm.hibernate3.HibernateTransactionManager$HibernateTransactionObject@6a4268] DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.getTransaction:347 - Creating new transaction with name [com.abc.xyz.data.AdEntryDao.getById]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin:430 - Opened new Session [org.hibernate.impl.SessionImpl@2de41d] for Hibernate transaction DEBUG org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin:441 - Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@2de41d]
Also, I see the following related messages when I shut down the TC:
Thanks very much for your inputs in advance.Code:... DEBUG org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession(772) - Closing Hibernate Session DEBUG com.abc.xyz.web.MyController.getExceptionHandler(616) - trying to find handler for exception class [java.lang.ThreadDeath] ...


Reply With Quote
