To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I'm running Vaadin with GlassFish + PostgreSQL and have the following scenario. My application has some potentially long-running queries that are sometimes killled by the user (by closing the window) but leave the query still running on the database. I'd like to be able to know about these connections and close them if/when a user closes a window and queries are still bound to a session. The connections are managed by a connection pool at the GlassFish level and pulled as needed as below:
What are others doing in this scenario? Do you have a running list of connections pulled from a session that are closed when the application is closed? Are there other ways in Vaadin to detect a closed connection that could clean up orphaned queries? Is this sort of thing even a good idea given that the connections are managed at the server and not the application?