1 Reply Latest reply on Oct 23, 2001 11:02 PM by David Jencks

    setAutoCommit() with a transaction

    Yaser Newbie


      I'm trying to invoke setAutoCommit( false ) method on my pooled database connection instance, but it appears that this method is throwing an SQLException saying: This connection is participating in a distributed transaction. Acutally I'm not quite sure what the problem is, but it seems to me that committing the database invokations may not be overridden if certain transaction is controlling this process. Can anybody explain what happens with me here?


        • 1. Re: setAutoCommit() with a transaction
          David Jencks Master

          The problem is that you are trying to control transactions yourself by setting AutoCommit. IMHO you should NEVER do this in any application, let alone one on an app server, however if you want to do something like this you need to be using BMT and be outside any transaction.

          If you want no transaction control ever anywhere you might consider using MySQL w/o transactional tables or a JDBCDataSourceLoader which leaves all its connections AutoCommit=true and does not interact with the transaction manager.