Re: Tapestry-hibernate module seemingly leaking connections

2024-06-13 Thread Christopher Dodunski (Tapestry)
Hi Ben, Your "educated guess" proved to be entirely correct! I added the below method to my RegistryProxy class, and calling it from the @OnMessage annotated method of the WebSocket server endpoint ensures Hibernate sessions get closed on completion and associated DB connections are released

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-11 Thread Ben Weidig
Hi Chris, the RegistryProxy should work, we use something similar for a script editor component with access to the Registry. We don't use WebSockets, though, so the normal lifecycle applies. With WebSockets, however, someone has to handle it manually. Beware, I don't have any experience with Tape

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-11 Thread Christopher Dodunski (Tapestry)
Hi Ben, Thank you for those helpful suggestions! You're right... debugging is tricky given the large number of moving parts. 😊 I've made some progress since last writing. By activating "hibernate.c3p0.debugUnreturnedConnectionStackTraces" within my Hibernate configuration I've been able to

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-09 Thread Ben Weidig
Hi Chris, debugging Hibernate connection problems is no fun at all... You're correct that org.apache.tapestry5.hibernate.HibernateSessionManager is thread-scoped and is supposed to clean up after itself by rolling back any uncommitted transaction and closing the session. Hibernate/Connection iss

Tapestry-hibernate module seemingly leaking connections

2024-06-04 Thread Christopher Dodunski (Tapestry)
Hi, My application's DAO class is employing an injected Hibernate Session for accessing a MySQL DB. Connection pooling is provided by C3PO. My understanding is that the Tapestry Hibernate IoC (per thread) service takes care of closing DB connections under the hood, releasing them back to th