1 Reply Latest reply on Apr 15, 2003 8:50 AM by David Jencks

    Can you manually rollback a transaction?

    shapirod Newbie

      We're using JBoss 3.0.6.

      Is it possible to manage the AutoCommit property of a DataSource through code in JBoss 3.X? I have seen older posts about using JDBCDataSourceLoader (how can one do this? I found no examples anywhere), but I also gathered that it is an obsolete methodology. Is this correct?

      NOTE: We have a significant amount of preexisting code that depends on managing transactions manually in our enterprise application running on a Weblogic server. We set autoCommit to false and then commit or rollback depending on business rule validations.

      Thank you,

      Daniel Shapiro
      Agilquest Inc.
      Daniel.Shapiro@agilquest.com

        • 1. Re: Can you manually rollback a transaction?
          David Jencks Master

          Subsitute the NoTxConnectionManager class for LocalTxConnectionManager in the mbean configs. I think you'll have to remove the TransactionManager attribute as well.

          Connections you get from this datasource will always have AutoCommit on. Each time you get a connection you will have to call setAutoCommit(false). (these autocommit settings are sent to the db only if you actually do work in the new autocommit setting, so this won't result in extra calls to the db).