3 Replies Latest reply on Apr 26, 2011 11:11 AM by hugbert

    How to set autocommit to false for managed transactions ?

    hugbert

      Hi,

       

      How can I set autocommit to false to be able to do managed transactions on JBoss 5.1?

       

      My problem is, that in my transaction handling the commit/rollback have no effect, because every statement is committed as soon as executed.

       

      This was working fine in JBoss 4.2 but doesn't work anymore since I changed to JBoss 5.1.

       

      I use EJB 2.x and CMP, my database config looks like this:

       

       

      <datasources>

          <local-tx-datasource>

              <jndi-name>DefaultDS</jndi-name>

              <connection-url>jdbc:derby://localhost:1528/workflowdb;create=true</connection-url>

              <driver-class>org.apache.derby.jdbc.ClientDriver</driver-class>

              <user-name>user</user-name>

              <password>password</password>

              <min-pool-size>5</min-pool-size>

              <max-pool-size>20</max-pool-size>

              <blocking-timeout-millis>1000</blocking-timeout-millis>

              <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

              <idle-timeout-minutes>5</idle-timeout-minutes>

              <track-statements/>

              <prepared-statement-cache-size>200</prepared-statement-cache-size>

              <metadata>

                  <type-mapping>Derby</type-mapping>

              </metadata>

              <connection-property name="autoCommit">false</connection-property>

          </local-tx-datasource>

      </datasources>

       

       

      Unfortunately I have no idea what's going wrong and did not find helpful information on the internet.

       

      Could anyone please give me a hint? What do I have to do?

       

      Thank you very much

      Hubert