开发者

Isolation level in database

I understand isolation level concept. But how do you set it a开发者_StackOverflow中文版nd where? I have never seen it in java programs to mess with this.


See the Connection interface. It defines the constants TRANSACTION_XXX which can be used with the setTransactionIsolation() method.


There will be a default isolation level, determined by the combination of the Java software used to access the DBMS and the DBMS itself. Generally, it is likely to work at a high level of isolation (SERIALIZABLE in the SQL Standard), but you can change the level at which you work using methods such as the one identified by stacker.

There may also be DBMS-specific statements you can use. The SQL Standard provides SET TRANSACTION as a preparable statement; you may find you have a statement such as SET ISOLATION too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜