1 Reply Latest reply on May 19, 2009 6:41 PM by peterj

    Issue with JBoss JNDI Data Source Autocommit Feature

    nnanda

      Hi,

      In my current project, we are using JBoss 5 GA application server. For database interactions, we are using JNDI data source configured in JBoss AS. I am trying to configure the Autocommit to "FALSE", however, it is not happening. Even if I have put the required configuration in my oracle-ds.xml file, the autocommit seems to be in TRUE state and all my inserts are commited automatically in the DB. Please see below my configuration of oracle-ds.xml file.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <datasources>
       <local-tx-datasource>
       <jndi-name>MyDS</jndi-name>
       <use-java-context>false</use-java-context>
      
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <connection-url>MY_URL</connection-url>
       <user-name>USER</user-name>
       <password>PASSWORD</password>
      
       <!-- The minimum connections in a pool/sub-pool -->
       <min-pool-size>5</min-pool-size>
      
       <!-- The maximum connections in a pool/sub-pool -->
       <max-pool-size>10</max-pool-size>
      
       <!-- The time before an unused connection is destroyed -->
       <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
       <idle-timeout-minutes>0</idle-timeout-minutes>
      
       <!-- ORACLE benefits from prepared statement caching -->
       <prepared-statement-cache-size>32</prepared-statement-cache-size>
      
       <!-- Connection Properties -->
       <connection-property name="auto-commit">false</connection-property>
      
       </local-tx-datasource>
      </datasources>
      

      This seems to be very strange. Is this a BUG in Jboss? Or I am missing any configuration? Please HELP.

      Thanks,
      Niranjan