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

    setAutoCommit() with a transaction

    yalmasri

      Hello,

      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?

      Thanx

        • 1. Re: setAutoCommit() with a transaction
          davidjencks

          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.