4 Replies Latest reply on Jun 29, 2012 4:17 AM by muza71

    Question about JDBC connections across transaction boundaries

    markus78

      Hi,

       

      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!

      at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:218)

       

      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...

       

      /Markus