I'm using Glassfish v2.1.1, MySQL 5.1 and ActiveMQ 5.4.2 incl. its resource adapter. If the ActiveMQ resource adapter throws an exception when participating in a XATransaction including both a database and jms transaction then glassfish will contain a transaction in rollback state which doesn't release its database connection to the database connection pool. These transactions will pile up and eventually saturate the database connection pool.
What happens here and how can I prevent these transactions to stall in the rollback state hanging on to the database connections?
Best regards Trym