0

How to set the Isolation level to Read Uncommitted for a Sybase datasource(Jconnect 7) which is defined as a jdbc datasource in Websphere 7

Should I have to add a new custom property to the data source or do I have to edit the 'connectionProperties' listed under custom properties?

The datasource is referenced through web application running with Spring (looked up by JndiObjectFactoryBean)

Arun Christopher
  • 302
  • 1
  • 6
  • 20

1 Answers1

1

In the admin console go to Resources->JDBC->Data Source->[your sybase data source]. Open 'custom properties' from the right side. you could see many properties related to the JDBC driver you are using. set the property named 'webSphereDefaultIsolationLevel'

For ex: here (READ COMMITTED) has been selected as isolation level. In your case the value should be 1 ie. (READ UNCOMMITTED).

 **webSphereDefaultIsolationLevel**  2       Specifies a default transaction isolation level for new connections. Resource References and Access Intents override this value. To configure a default transaction isolation level, use the constants defined by JDBC: 1 (READ UNCOMMITTED), 2 (READ COMMITTED), 4 (REPEATABLE READ), 8 (SERIALIZABLE).  
Ram C
  • 173
  • 3
  • 12
  • Thanks Ram. But I found this not working for sybase\jconnect. The application failed to make connection with the database on server restart after making this configuration. I ended up specifying the isolation level to Read uncommited over each business method using spring `@Transactional( isolation=Isolation.READ_UNCOMMITTED)` and this worked perfectly. But would have preferred having something at connection level. – Arun Christopher Mar 04 '14 at 22:13
  • @ArunChristopher What is your Sybase server version and the client jar? It works for us with jconn4 connecting ASE 15.x – Ram C Mar 05 '14 at 21:35