oracle.net.READ_TIMEOUT : Pass oracle.net.READ_TIMEOUT as connection property to enable read timeout on socket. The timeout value is in milliseconds.
oracle.jdbc.ReadTimeout : read timeout while reading from the socket. This affects thin driver only. Timeout is in milliseconds.
Example:
Properties prop = new Properties ();
prop.put ("user", "SCOTT");
prop.put ("password", "TIGER");
prop.put ("oracle.net.READ_TIMEOUT", "180000"); //Here 180000 is milliseconds i.e.180 seconds or 3 minutes.
prop.put ("oracle.jdbc.ReadTimeout", "180000"); //Here 180000 is milliseconds i.e.180 seconds or 3 minutes.
conn = DriverManager.getConnection (url, prop);
References:
- http://docs.oracle.com/cd/E14072_01/appdev.112/e13995/oracle/jdbc/pool/OracleDataSource.html
- http://forum.springsource.org/showthread.php?82286-oracle-jdbc-ReadTimeout-not-leading-to-expected-socket-timeout
- http://scn.sap.com/thread/2106220
- http://troyjsd.blogspot.in/
- http://pic.dhe.ibm.com/infocenter/ssfs/v9r2/index.jsp?topic=%2Fcom.ibm.help.install.doc%2Ft_EnablingFailoverInAMultipleNodeOracleRACDatabaseClusterInWindo.html
Important: Read the following article also:
- LESSON LEARNED WITH ORACLE TIMEOUT SETTINGS - http://frank-luo.blogspot.in/
No comments:
Post a Comment