0 Replies Latest reply on Dec 13, 2006 11:49 AM by Yair Zaslavsky

    Wrong behavior in my application, after setting transaction

    Yair Zaslavsky Newbie

      Hi all,
      This is my datasources definition:


      - <local-tx-datasource>
      <jndi-name>AmsDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/ams_db</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>jboss</user-name>
      password
      <transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
      <min-pool-size>1</min-pool-size>
      <max-pool-size>200</max-pool-size>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
      -
      <type-mapping>mySQL</type-mapping>

      </local-tx-datasource>


      As you can see, I set the transaction isolation level to READ_UNCOMMITED.
      However, when I restart jboss, when I try to persist an entry from transaction A, and then , inside the transaction code to select the persisted entry, I get that the entry does not exist. Both insertion and selection are done using EntityManager.

      I thought that using READ_UNCOMITTED means that I can read any uncommited changes made by any transaction.

      Can anyone explain me what I'm doing wrong?

      Thanks

      Yair Zaslavsky