February 2, 2006

Logging Abandoned Connections - possible with local-tx-datasource?

Filed under: add to del.icio.us

I’m currently tracking down database connection leaks, which is always fun.     In the new version of our product, we’re using JBoss’ local-tx-datasource.    In our last version, we were using a javax.sql.DataSource declared as a resource within a <context> (see here).    Does anyone know how to get JBoss’ local-tx-datasource to log abandoned connections?

I’m currently doing this by populating an exception in the initializer of our Database delegate class, setting it to null on a database close, and then printing it if it is not null on finalize.     I’d rather use the container to do this sort of thing though.

Look for similar articles under these categories: 

No responses to "Logging Abandoned Connections - possible with local-tx-datasource?"

Leave a Reply
Commenting policy: Some comments run the risk of being deleted. These include comments that are spam or cannot be understood or are rude.
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Top - Home