Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: When remote database used in DB Link is down, JDBC hangs
Well, it appeared that this is nothing to do with Tomcat. The following
sequence
of calls causes the same symptoms:
Statement stmt2 = cn.createStatement(); ResultSet rs2 = stmt2.executeQuery("select 'x' from dual_at_mylink"); rs2.next(); System.out.println(rs2.getString(1)); rs2.close(); stmt2.close(); // !!! do shutdown immediate to DB referenced by mylink, now stmt2 = cn.createStatement(); rs2 = stmt2.executeQuery("select 'x' from dual_at_mylink"); // !!! hangs forever rs2.next(); System.out.println(rs2.getString(1)); rs2.close(); stmt2.close();
If I would create a new connection for the second set of statements
(before
second stmt2 = ...), it will not hang, and I will get correct error:
java.sql.SQLException: ORA-02068: following severe error from MYLINK
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Looks like something to do with Oracle JDBC driver? Received on Fri Feb 10 2006 - 09:29:08 CST