MC_OPR is a view as "select * from MC_OPR_M" at beginning;
new Thread(new Runable(){
Connection conn1 = datasource.getConnection();
public void run(){
for(;;){
conn.createStatement().executeQuery("select * from MC_OPR"); // then return from MC_OPR_M
}
}
}).start();
new Thread(new Runable(){
Connection conn2 = datasource.getConnection();
char[] suffixs = new char[]{'S','M'};
public void run(){
for(int i=0;true;i++){
conn.createStatement().execute("create or replace view MC_OPR as select * from MC_OPR_"+ suffixs[i%2]);
// after this statement, conn1 always get from MC_OPR_M
}
}
}).start();
Original issue reported on code.google.com by artern@gmail.com on 24 Oct 2013 at 2:32
Original issue reported on code.google.com by
artern@gmail.com
on 24 Oct 2013 at 2:32