I'm in the process of migrating our enterprise application from JBoss 3.0.7 to 3.2.2 and I've encountered a DataSource/Connection problem that I've not seen before.
When getting a Connection from a DataSource using dataSource.getConnection() from a BMP Entity, I'm getting the following error:
Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed; - nested throwable: (javax.resource.ResourceException: Could not enlist in transaction on entering meta-awar
e object!javax.transaction.SystemException: enlistResource failed)
The datasource is defined in the following manner:
<!-- sql to call when connection is created -->
<new-connection-sql>SELECT COUNT(*) FROM aTable</new-connection-sql>
<!-- sql to call on an existing pooled connection when it is obtained from pool -->
<check-valid-connection-sql>SELECT COUNT(*) FROM aTable</check-valid-connection-sql>
This application works fine in JBoss 3.0.7 so I assume this is a configuration issue. Does anyone know how to correct this?
we have the same problem.
I noticed, that it mainly occurs, when an Exception is thrown.
In this case also database connections are not returned to the pool although we are closing them.
Does anybody kow why this occurs ?