I have googled and found lots of documents and web pages saying that I should set oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR to 3 seconds. I was unable to locate an example of how exactly to do that.
Is it a system level property that I can set with -Doracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR=3 or what? A properties file? A Spring config example?
I have a plain java application with the ojdbc.jar in the classpath. Beans are configured/wired using Spring xml.
<bean id="myDataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${my.jdbc.driverClassName}" />
<property name="url" value="${my.jdbc.url}" />
<!-- cut -->
</bean>