1 Reply Latest reply on Feb 2, 2004 3:37 AM by Guofeng Zhang

    How to set the isolation level

    Guofeng Zhang Novice

      The seesion beans of our application use JDBC to access the database.

      We have to set the isolation level to TRANSACTION_READ_UNCOMMITTED when a connection is got from the data source pool:
      conn.setTransactionIsolation( connection.TRANSACTION_READ_UNCOMMITTED ) ;

      This application works well on JBoss 3.0.8, but it fails on JBoss 3.2.3. The error message is "java.sql.SQLException: You cannot set isolation level during a managed transaction!".

      I know that the above java statement will changed the default isolation level. That is not allowed because in this case the transaction will be commited.

      I want to know if the default isolation level can be set in the data source configuration xml file?

      Thanks for your help.

        • 1. Re: How to set the isolation level
          Guofeng Zhang Novice

          cited from: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=14967

          you can set the transaction isolation level in the datasource configuration file name-ds.xml in the deploy directory for jboss 3.x.x.
          this is an example for ms sqlserver:


          < password>xxx< /password>