Setting transaction isolation level for servlet and JavaServer Pages (JSP) database access
 Technote (FAQ)
 
Problem
Whenever a database connection is obtained from a WebSphere® Application Server data source by a JSP™, servlet or application running in the Web container, the transaction isolation level defaults to TRANSACTION_REPEATABLE_READ.
 
Solution
When accessing a data source using application code, such as a JSP or servlet running in the Web container, there are fewer options to change the transaction isolation level for the connection than when using an EJB™. To change the transaction isolation level for a JSP or servlet, you must insert a setTransactionIsolationLevel(value) in the code immediately after the getConnection(value).

This is also true for setIsolationLevel().

For more information about isolation levels and their effects, refer to the "Isolation Levels" section in the WebSphere Application Server Tuning Guide at:

http://www-306.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/0901.html

 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): HP-UX
Software version: 4.0.4
Software edition:
Reference #: 1168426
IBM Group: Software Group
Modified date: Mar 1, 2005