users@glassfish.java.net

Re: Glassfish scalability issue

From: <glassfish_at_javadesktop.org>
Date: Mon, 23 Jul 2007 08:09:13 PDT

c)
one more option (by proprietary way).

Since your jdk is 1.6, using JDBC 4.0 feature, you can set socket read timeout and see how it goes.
Refer http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq_0.htm for "oracle.jdbc.ReadTimeout"

eg:
---------------------------------------------------------------------
DataSource ds =
(DataSource)ic.lookup("jdbc/resource");

oracle.jdbc.pool.OracleDataSource ods =
ds.unwrap(javax.sql.DataSource.class);
Properties properties = new Properties();
properties.setProperty("oracle.jdbc.ReadTimeout","5000"); //socket read timeout : 5 seconds.
ods.setConnectionProperties(properties);
//do not use the OracleDS ("ods") to getConneciton, use only "ds"
---------------------------------------------------------------------
[Message sent by forum member 'jr158900' (jr158900)]

http://forums.java.net/jive/thread.jspa?messageID=227707