Friday, December 17, 2004 02:20 AM
There is NO
way to do this in general. Even for specific databases, the real meaning, and the performance of isolation levels is a complex issue (I have worked with Oracle, DB2, and quite a few smaller databases - all had slightly different definitions and implementations of isolation levels). This is also mirrored in the J2EE spec - after trying for 5 years, finally all standardization of isolation levels was pulled from the spec, because the database and other vendors could not agree on what the whole thing should really do or not.
If you need a performant implementation, this can only be done inside the database engine (with tricky concepts like "copy on write", internal version counters, "version trees" etc.etc.). All other implementations will be slow and probably be a hack - but they may solve your concrete problem! - so my answer is: Eithre get the right database, and you are done; or solve the very specific problem you have - whatever this is.
Regards and maybe sorry for those facts - but that's life