setting the transaction isolation level to '2' is not supported in JBoss EAP 5.x

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Issue

  • Application is throwing the following error message in the server.log file repeatedly.

    ERROR [STDERR] (JCA PoolFiller) Warning: setting the transaction isolation level to '2' is not supported. 
    
  • The particular datasource transaction-isolation level is set to "TRANSACTION_READ_COMMITTED" in the *-ds.xml file.

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

Resolution

  • The underlying database driver does not support setting transaction level to TRANSACTION_READ_COMMITTED. The transaction isolation level support varies among database vendors.

Root Cause

  • This error message is being generated by Java Database Connectivity (JDBC). This message implies that the database driver for the particular data source does not support TRANSACTION_READ_COMMITTED isolation level. JDBC Sql Connection class has constants defined for each isolation value. These constant values are listed here [1]. TRANSACTION_READ_COMMITTED equals constant value 2. Hence the error message prints isolation level as 2.

  • TRANSACTION_READ_COMMITTED indicates that dirty reads are prevented and non-repeatable reads and phantom reads can occur. This level prevents a transaction from reading a record with uncommitted changes in it. More details on transaction isolation level can be found here [2].

[1] http://download.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Connection.TRANSACTION_READ_COMMITTED
[2] http://en.wikipedia.org/wiki/Isolation_level

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments