What options can be? Why the isolation level of DataBase doesn't change?
I have local DataBase and connect to them with:
connect = DriverManager.getConnection("jdbc:sqlserver://"
+ "localhost;IntegratedSecurity=True;"
+ "databaseName=" + TestsConstants.DB_NAME + "; ");
Then I use this method for set TRANSACTION_READ_UNCOMMITTED level:
public static void setTransaction() {
try {
connect.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
connect.setAutoCommit(false);
} catch (SQLException e) {
e.printStackTrace();
}
}
I recheck isolation level:
System.out.println(connect.getTransactionIsolation());
And receive 1. That's right.
Then I insert some data in my DB, and stops on BreackPoint in my Java code.
Transaction not close yet.
Now I try to read data with SELECT operator from other process, for example from "Microsoft SQL Server Management Studio" or from "Micosoft Visual Studio" or from my local WebSite. And it`s fail.
Query execution freezes until Transaction is not commiting from Java code.
Help me, please, what is wrong in this algorithm?
What can I do for READ_UNCOMMITTED changes from DB?