Hi all...I have seen in SQL/SQLJ people do implement different Isolation Levels in their various Queries. But what I want to do is keep the query as simple as it can be but will implement the isolation level while committing any transaction in my code. Is that possible? For an instance, lets say my background DB is DB2. Please suggest me the best option here.
Note: I want this to happen because suppose I do have n-numbers of queries for my application (already written). And now if I want to manually implement isolation for each query (i.e., say by adding "WITH UR" at the end of each query) then for sure that will be very troublesome -right? Let me present one sample JDBC/MySQL example to elaborate:
a) Will define the necessary variables as follows:
b) Getting Connection and Query
c) Execute the Query <-----But here is the problem. I just don't want to write as follows:
Rather, I want to add Isolation Level with each query (at the end), while going to comit any specific transaction. But how? I was thinking about String concatination but as I saw some classes are available in .NET platform therefore was thinking may be Java will have similear something like that.