2 Replies Latest reply on Jan 6, 2003 11:19 PM by davidjencks

    jboss not setting autocommit properly

    gcm614

      When inside a method marked with the transaction required attribute in the deployment descriptor. JBoss is not setting the autocommit field to false on the database connection!

      I am using RedHat 8.0, JBOSS 3.0.4, Tomcat 4.1.12, And Postgres 7.2.2-1. I have duplicated the problem in both session and bmp entity beans.

        • 1. Re: jboss not setting autocommit properly
          gcm614

          I think I have figured it out. It is executing in a transaction and I can roll it back. Although when you call theDBConn.getAutoCommit() in the transaction it returns true. Is this the way it is supposed to be? I would expect a result of false for autocommit() when in a transaction.

          • 2. Re: jboss not setting autocommit properly
            davidjencks

            Apparently I didn't read the spec carefully engough to find where they explained the required behavior. I figured that since you didn't call setAutocommit yourself, and you can't call commit yourself inside a managed transaction, the adapter should continue to report autocommit true. This however disagrees with the spec and apparently most peoples expectations.

            anyway, as you noticed, managed transactions are in fact working correctly, even with the confusing getAutocommit return value.