I have an cituation where a bean ("outer transaction") invokes on another bean which has "requiresnew" set thus I get a new transaction "inside" my current one, this works fine on our old WebSphere appserver but I'm running into problems trying to migrate this to JBoss AS 7
I get the following WARN and after that my JDBC (xa-datasource) connection pool starts to starve itself and using up connections without releasing them.
13:20:48,062 WARN [org.jboss.tm.usertx.UserTransactionRegistry] (http-executor-threads - 13)
Error notifying listener
org.jboss.jca.core.tx.jbossts.UserTransactionListenerImpl@19302fb of userTransactionStarted:
java.lang.IllegalStateException: Trying to change transaction TransactionImple < ac, BasicAction: 0:ffff82ef5b1d:6868fe66:4f3b9daa:1488
status: ActionStatus.RUNNING > in enlist!
Googling the problem I find some old posts that claim that JBoss does not support keeping jdbc connections open across transaction boundaries, is this the case? Do I need to modify my code and make sure that I close my connections before
invoking on the "requiresnew" bean?
We are also using Spring...
I having the same problem, when having an aspect transaction running and creating new transactions with requiersnew.
I got the same WARN message in the log as markus.
It's only show up in some of our larger tests, and we fail to recreate it in a small isolated test.
We are trying to understand why we seeing this and how to recreate so that we later on can avoid it.
The TransactionAwareDataSourceProxy fix works for this, but we don't want to us that if there is a another way of doing this.
And btw, we are using JBoss 7.1.1 at moment.